SC analysis compiles, intermediate switching to std::vector
This commit is contained in:
@ -119,21 +119,23 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
jungfrauFile *thisfile = new jungfrauFile();
|
jungfrauFile *thisfile = new jungfrauFile();
|
||||||
|
|
||||||
jungfrauPedestal *pedestalObject_SC[16];
|
vector<jungfrauPedestal*> pedestalObject_SC(16); //should call default constructor 16 times
|
||||||
TH2F *pedestalsG0[16];
|
vector<TH2F*> pedestalsG0;
|
||||||
TH2F *pedeRMSG0[16];
|
pedestalsG0.reserve(16);
|
||||||
|
vector<TH2F*> pedeRMSG0;
|
||||||
|
pedeRMSG0.reserve(16);
|
||||||
for (int sci = 0; sci < 16; ++sci) {
|
for (int sci = 0; sci < 16; ++sci) {
|
||||||
pedestalObject_SC[sci] = new jungfrauPedestal();
|
//pedestalObject_SC[sci] = new jungfrauPedestal();
|
||||||
pedestalObject_SC[sci]->pedestalSetNFrames(100);
|
pedestalObject_SC[sci]->pedestalSetNFrames(100);
|
||||||
|
|
||||||
Char_t *pedehistoname = new Char_t[50];
|
Char_t *pedehistoname = new Char_t[50];
|
||||||
snprintf( pedehistoname, 50, "pedestalsG0_sc%d", sci );
|
snprintf( pedehistoname, 50, "pedestalsG0_sc%d", sci );
|
||||||
pedestalsG0[sci] = new TH2F( pedehistoname, "", NC, -0.5, NC-0.5, NR, -0.5, NR-0.5 );
|
pedestalsG0.push_back( new TH2F( pedehistoname, "", NC, -0.5, NC-0.5, NR, -0.5, NR-0.5 ) );
|
||||||
snprintf( pedehistoname, 50, "pedeRMSG0_sc%d", sci );
|
snprintf( pedehistoname, 50, "pedeRMSG0_sc%d", sci );
|
||||||
pedeRMSG0[sci] = new TH2F( pedehistoname, "", NC, -0.5, NC-0.5, NR, -0.5, NR-0.5 );
|
pedeRMSG0.push_back( new TH2F( pedehistoname, "", NC, -0.5, NC-0.5, NR, -0.5, NR-0.5 ) );
|
||||||
}
|
}
|
||||||
static uint16_t pedestals16_G0_start[16][NCH]; //I suppose, this is to track pedestal shifting over the course of data taking
|
static vector< vector<uint16_t> > pedestals16_G0_start( 16, vector<uint16_t>(NCH) ); //I suppose, this is to track pedestal shifting over the course of data taking
|
||||||
static double pedeRMS16_G0[16][NCH];
|
static vector< vector<double> > pedeRMS16_G0( 16, vector<double>(NCH) );
|
||||||
|
|
||||||
for (int pedefilei = 0; pedefilei < pedefilen; ++pedefilei) {
|
for (int pedefilei = 0; pedefilei < pedefilen; ++pedefilei) {
|
||||||
|
|
||||||
@ -168,7 +170,7 @@ int main(int argc, char* argv[]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pedestalObject_SC[sci]->pedestalData((uint16_t*)(&pedestals16_G0_start[sci])); //this loads the pedestal data into the array pedestals16_G0_start
|
pedestalObject_SC[sci]->pedestalData((uint16_t*)(&pedestals16_G0_start[sci])); //this loads the pedestal data into the array pedestals16_G0_start
|
||||||
pedestalObject_SC[sci]->pedestalRMSData(pedeRMS16_G0[sci]); //same here
|
pedestalObject_SC[sci]->pedestalRMSData(pedeRMS16_G0[sci].data()); //same here
|
||||||
pedestalObject_SC[sci]->pedestalResetUpdates();
|
pedestalObject_SC[sci]->pedestalResetUpdates();
|
||||||
//pedestalObject[sci]->pedestalClear(); //I don't need to clear if I only calculate pedestal once.
|
//pedestalObject[sci]->pedestalClear(); //I don't need to clear if I only calculate pedestal once.
|
||||||
}
|
}
|
||||||
@ -200,6 +202,8 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
int adc2d_nbin= 1200;
|
int adc2d_nbin= 1200;
|
||||||
if (isJF11) adc2d_nbin= 1600;
|
if (isJF11) adc2d_nbin= 1600;
|
||||||
|
|
||||||
|
//HERE!!!
|
||||||
|
|
||||||
|
|
||||||
TH2I *adc2d[8][16];
|
TH2I *adc2d[8][16];
|
||||||
@ -242,7 +246,7 @@ int main(int argc, char* argv[]) {
|
|||||||
uint16_t* imagedptr = thisfile->getFrameDataHandle();
|
uint16_t* imagedptr = thisfile->getFrameDataHandle();
|
||||||
uint64_t scnumber = thisfile->currentSCnumber();
|
uint64_t scnumber = thisfile->currentSCnumber();
|
||||||
|
|
||||||
pedestalObject_SC[scnumber]->addG0FrameToPedestalCalculationWThreshold( imagedptr, pedestalObject_SC[scnumber], pedeRMS16_G0[scnumber] );
|
pedestalObject_SC[scnumber]->addG0FrameToPedestalCalculationWThreshold( imagedptr, pedestalObject_SC[scnumber], pedeRMS16_G0[scnumber].data() );
|
||||||
|
|
||||||
for (int i = 0; i < NCH; i++) {
|
for (int i = 0; i < NCH; i++) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user