TString monitoringType("YES");
Int_t forceTriggerId=-1;
Int_t saveOption=2; // how to store the object. See AliTPCCalibCE::DumpToFile
+ Bool_t skipAmore=kFALSE;
if ( config.GetConfigurationMap()->GetValue("LaserTriggerName") ) {
laserTriggerName=config.GetConfigurationMap()->GetValue("LaserTriggerName")->GetName();
saveOption=TMath::Nint(config.GetValue("SaveOption"));
printf("TPCCEda: Saving option set to: %d.\n",saveOption);
}
+
+ if ( config.GetConfigurationMap()->GetValue("SkipAmore") ) {
+ skipAmore=((TObjString*)config.GetConfigurationMap()->GetValue("SkipAmore"))->GetString().Atoi();
+ printf("TPCCEda: Skip Amore set in config\n");
+ }
//subsribe to laser triggers only in physics partition
//if the trigger class is not available the return value is -1
// send the data to AMOREdb
if (stopWatch.RealTime()>updateInterval){
calibCE->Analyse();
- SendToAmoreDB(calibCE,runNb);
+ if (!skipAmore) SendToAmoreDB(calibCE,runNb);
stopWatch.Start();
} else {
stopWatch.Continue();
// Analyse CE data and write them to rootfile
//
printf ("TPCCEda: %d events processed, %d used\n",nevents,calibCE->GetNeventsProcessed());
-
-// TFile * fileTPC = new TFile (RESULT_FILE,"recreate");
-// calibCE->Write("tpcCalibCE");
-// delete fileTPC;
-
+
+ //save data to file
calibCE->DumpToFile(RESULT_FILE,Form("name=tpcCalibCE,type=%d",saveOption));
printf("TPCCEda: Wrote %s\n",RESULT_FILE);
/* store the result file on FES */
-
status=daqDA_FES_storeFile(RESULT_FILE,FILE_ID);
if (status) {
status = -2;
}
- printf("TPCCEda: Amore part\n");
- calibCE->Analyse();
- SendToAmoreDB(calibCE,runNb);
+ if (!skipAmore){
+ printf("TPCCEda: Amore part\n");
+ calibCE->Analyse();
+ SendToAmoreDB(calibCE,runNb);
+ }
delete calibCE;
return status;
TString monitoringType("YES");
TString cdb("local:///local/cdb");
Int_t forceTriggerId=-1;
+ Bool_t skipAmore=kFALSE;
if ( config.GetConfigurationMap()->GetValue("LaserTriggerName") ) {
laserTriggerName=config.GetConfigurationMap()->GetValue("LaserTriggerName")->GetName();
forceTriggerId=TMath::Nint(config.GetValue("ForceLaserTriggerId"));
printf("TPCCEnewda: Only processing triggers with Id: %d.\n",forceTriggerId);
}
-
+
+ if ( config.GetConfigurationMap()->GetValue("SkipAmore") ) {
+ skipAmore=((TObjString*)config.GetConfigurationMap()->GetValue("SkipAmore"))->GetString().Atoi();
+ printf("TPCCENEWda: Skip Amore set in config\n");
+ }
+
//subsribe to laser triggers only in physics partition
//if the trigger class is not available the return value is -1
//in this case we are most probably running as a standalone
// send the data to AMOREdb
if (stopWatch.RealTime()>updateInterval){
calibCE.Analyse();
- SendToAmoreDB(calibCE,runNb);
+ if (!skipAmore) SendToAmoreDB(calibCE,runNb);
stopWatch.Start();
} else {
stopWatch.Continue();
if (status) {
status = -2;
}
-
- printf("TPCCEnewda: Amore part %s\n",RESULT_FILE);
- SendToAmoreDB(calibCE,runNb);
+
+ if (!skipAmore) {
+ printf("TPCCEnewda: Amore part %s\n",RESULT_FILE);
+ SendToAmoreDB(calibCE,runNb);
+ }
return status;
}
}
AliTPCConfigDA config(CONFIG_FILE);
// check configuration
+ Bool_t skipAmore=kFALSE;
+
if ( (Int_t)config.GetValue("NoTimeAnalysis") == 1 ) {
printf("WARNING: Time analysis was switched off in the configuration file!\n");
timeAnalysis=kFALSE;
}
+
if ( (Int_t)config.GetValue("UseFastDecoder") == 1 ){
printf("Info: The fast decoder will be used for the processing.\n");
fastDecoding=kTRUE;
}
-
+
+ if ( config.GetConfigurationMap()->GetValue("SkipAmore") ) {
+ skipAmore=((TObjString*)config.GetConfigurationMap()->GetValue("SkipAmore"))->GetString().Atoi();
+ printf("TPCPEDESTALda: Skip Amore set in config\n");
+ }
+
+
// create calibration object
AliTPCCalibPedestal calibPedestal(config.GetConfigurationMap()); // pedestal and noise calibration
calibPedestal.SetAltroMapping(mapping->GetAltroMapping()); // Use altro mapping we got from daqDetDb
//
//Send objects to the AMORE DB
//
- printf ("AMORE part\n");
- const char *amoreDANameorig=gSystem->Getenv("AMORE_DA_NAME");
- //cheet a little -- temporary solution (hopefully)
- //
- //currently amoreDA uses the environment variable AMORE_DA_NAME to create the mysql
- //table in which the calib objects are stored. This table is dropped each time AmoreDA
- //is initialised. This of course makes a problem if we would like to store different
- //calibration entries in the AMORE DB. Therefore in each DA which writes to the AMORE DB
- //the AMORE_DA_NAME env variable is overwritten.
-
- //find processed sector
- Char_t sideName='A';
- Int_t sector = -1;
- for ( Int_t roc = 0; roc < 72; roc++ ) {
- if ( !calibPedestal.GetCalRocPedestal(roc) ) continue;
- if (mapping->GetSideFromRoc(roc)==1) sideName='C';
- sector = mapping->GetSectorFromRoc(roc);
- }
-// gSystem->Setenv("AMORE_DA_NAME",Form("TPC-%c%02d-%s",sideName,sector,FILE_ID));
- gSystem->Setenv("AMORE_DA_NAME",Form("%s-%s",gSystem->Getenv("DATE_ROLE_NAME"),FILE_ID));
-
- //
- // end cheet
- if (sector>-1){
- TDatime time;
- TObjString info(Form("Run: %u; Date: %s",runNb,time.AsSQLString()));
-
- amore::da::AmoreDA amoreDA(amore::da::AmoreDA::kSender);
- Int_t statusDA=0;
- statusDA+=amoreDA.Send("Pedestals",calibPedestal.GetCalPadPedestal());
- statusDA+=amoreDA.Send("Noise",calibPedestal.GetCalPadRMS());
- statusDA+=amoreDA.Send("Info",&info);
- if ( statusDA )
- printf("Warning: Failed to write one of the calib objects to the AMORE database\n");
- } else {
- printf("Warning: No data found!\n");
+ if (!skipAmore){
+ printf ("AMORE part\n");
+ const char *amoreDANameorig=gSystem->Getenv("AMORE_DA_NAME");
+ //cheet a little -- temporary solution (hopefully)
+ //
+ //currently amoreDA uses the environment variable AMORE_DA_NAME to create the mysql
+ //table in which the calib objects are stored. This table is dropped each time AmoreDA
+ //is initialised. This of course makes a problem if we would like to store different
+ //calibration entries in the AMORE DB. Therefore in each DA which writes to the AMORE DB
+ //the AMORE_DA_NAME env variable is overwritten.
+
+ //find processed sector
+ Char_t sideName='A';
+ Int_t sector = -1;
+ for ( Int_t roc = 0; roc < 72; roc++ ) {
+ if ( !calibPedestal.GetCalRocPedestal(roc) ) continue;
+ if (mapping->GetSideFromRoc(roc)==1) sideName='C';
+ sector = mapping->GetSectorFromRoc(roc);
+ }
+ // gSystem->Setenv("AMORE_DA_NAME",Form("TPC-%c%02d-%s",sideName,sector,FILE_ID));
+ gSystem->Setenv("AMORE_DA_NAME",Form("%s-%s",gSystem->Getenv("DATE_ROLE_NAME"),FILE_ID));
+
+ //
+ // end cheet
+ if (sector>-1){
+ TDatime time;
+ TObjString info(Form("Run: %u; Date: %s",runNb,time.AsSQLString()));
+
+ amore::da::AmoreDA amoreDA(amore::da::AmoreDA::kSender);
+ Int_t statusDA=0;
+ statusDA+=amoreDA.Send("Pedestals",calibPedestal.GetCalPadPedestal());
+ statusDA+=amoreDA.Send("Noise",calibPedestal.GetCalPadRMS());
+ statusDA+=amoreDA.Send("Info",&info);
+ if ( statusDA )
+ printf("Warning: Failed to write one of the calib objects to the AMORE database\n");
+ } else {
+ printf("Warning: No data found!\n");
+ }
+ // reset env var
+ if (amoreDANameorig) gSystem->Setenv("AMORE_DA_NAME",amoreDANameorig);
}
- // reset env var
- if (amoreDANameorig) gSystem->Setenv("AMORE_DA_NAME",amoreDANameorig);
//
// Now prepare ASCII files for local ALTRO configuration through DDL.
char localfile[255];
unsigned long32 runNb=0; //run number
// configuration options
- Bool_t fastDecoding = kFALSE;
// if test setup get parameters from $DAQDA_TEST_DIR
if (!mapping){
}
AliTPCConfigDA config(CONFIG_FILE);
// check configuration options
- if ( (Int_t)config.GetValue("UseFastDecoder") == 1 ) {
- printf("Info: The fast decoder will be used for the processing.\n");
- fastDecoding=kTRUE;
+ Bool_t skipAmore=kFALSE;
+
+ //skip the amore part
+ if ( config.GetConfigurationMap()->GetValue("SkipAmore") ) {
+ skipAmore=((TObjString*)config.GetConfigurationMap()->GetValue("SkipAmore"))->GetString().Atoi();
+ printf("TPCPULSERda: Skip Amore set in config\n");
}
// create calibration object
//
//Send objects to the AMORE DB
//
- printf ("AMORE part\n");
- const char *amoreDANameorig=gSystem->Getenv("AMORE_DA_NAME");
- //cheet a little -- temporary solution (hopefully)
- //
- //currently amoreDA uses the environment variable AMORE_DA_NAME to create the mysql
- //table in which the calib objects are stored. This table is dropped each time AmoreDA
- //is initialised. This of course makes a problem if we would like to store different
- //calibration entries in the AMORE DB. Therefore in each DA which writes to the AMORE DB
- //the AMORE_DA_NAME env variable is overwritten.
-
- //find processed sector
- Char_t sideName='A';
- Int_t sector = -1;
- for ( Int_t roc = 0; roc < 72; roc++ ) {
- if ( !calibPulser.GetCalRocT0(roc) ) continue;
- if (mapping->GetSideFromRoc(roc)==1) sideName='C';
- sector = mapping->GetSectorFromRoc(roc);
+ if (!skipAmore){
+ printf ("AMORE part\n");
+ const char *amoreDANameorig=gSystem->Getenv("AMORE_DA_NAME");
+ //cheet a little -- temporary solution (hopefully)
+ //
+ //currently amoreDA uses the environment variable AMORE_DA_NAME to create the mysql
+ //table in which the calib objects are stored. This table is dropped each time AmoreDA
+ //is initialised. This of course makes a problem if we would like to store different
+ //calibration entries in the AMORE DB. Therefore in each DA which writes to the AMORE DB
+ //the AMORE_DA_NAME env variable is overwritten.
+
+ //find processed sector
+ Char_t sideName='A';
+ Int_t sector = -1;
+ for ( Int_t roc = 0; roc < 72; roc++ ) {
+ if ( !calibPulser.GetCalRocT0(roc) ) continue;
+ if (mapping->GetSideFromRoc(roc)==1) sideName='C';
+ sector = mapping->GetSectorFromRoc(roc);
+ }
+ //gSystem->Setenv("AMORE_DA_NAME",Form("TPC-%c%02d-%s",sideName,sector,FILE_ID));
+ gSystem->Setenv("AMORE_DA_NAME",Form("%s-%s", gSystem->Getenv("DATE_ROLE_NAME"), FILE_ID));
+ //
+ // end cheet
+ if (sector>-1){
+ TDatime time;
+ TObjString info(Form("Run: %u; Date: %s",runNb,time.AsSQLString()));
+
+ amore::da::AmoreDA amoreDA(amore::da::AmoreDA::kSender);
+ Int_t statusDA=0;
+ statusDA+=amoreDA.Send("PulserT0",calibPulser.GetCalPadT0());
+ statusDA+=amoreDA.Send("PulserQ",calibPulser.GetCalPadQ());
+ statusDA+=amoreDA.Send("PulserRMS",calibPulser.GetCalPadRMS());
+ statusDA+=amoreDA.Send("arrayTmean",calibPulser.GetMeanTimeSectorArray());
+ statusDA+=amoreDA.Send("Info",&info);
+ if ( statusDA!=0 )
+ printf("Waring: Failed to write one of the calib objects to the AMORE database\n");
+ } else {
+ printf("Waring: No data found!\n");
+ }
+ // reset env var
+ if (amoreDANameorig) gSystem->Setenv("AMORE_DA_NAME",amoreDANameorig);
}
- //gSystem->Setenv("AMORE_DA_NAME",Form("TPC-%c%02d-%s",sideName,sector,FILE_ID));
- gSystem->Setenv("AMORE_DA_NAME",Form("%s-%s", gSystem->Getenv("DATE_ROLE_NAME"), FILE_ID));
- //
- // end cheet
- if (sector>-1){
- TDatime time;
- TObjString info(Form("Run: %u; Date: %s",runNb,time.AsSQLString()));
-
- amore::da::AmoreDA amoreDA(amore::da::AmoreDA::kSender);
- Int_t statusDA=0;
- statusDA+=amoreDA.Send("PulserT0",calibPulser.GetCalPadT0());
- statusDA+=amoreDA.Send("PulserQ",calibPulser.GetCalPadQ());
- statusDA+=amoreDA.Send("PulserRMS",calibPulser.GetCalPadRMS());
- statusDA+=amoreDA.Send("arrayTmean",calibPulser.GetMeanTimeSectorArray());
- statusDA+=amoreDA.Send("Info",&info);
- if ( statusDA!=0 )
- printf("Waring: Failed to write one of the calib objects to the AMORE database\n");
- } else {
- printf("Waring: No data found!\n");
- }
- // reset env var
- if (amoreDANameorig) gSystem->Setenv("AMORE_DA_NAME",amoreDANameorig);
-
//
// Now prepare ASCII files for local ALTRO configuration through DDL.
//
Double_t updateInterval=30; //seconds
TString laserTriggerName("C0LSR-ABCE-NOPF-CENT");
TString forceLaserTriggerId("-1");
+ TString monitorAttributes=Form("%d",ATTR_ORIGINAL_EVENT);
+ Bool_t skipAmore=kFALSE;
//amore update interval
Double_t valConf=config.GetValue("AmoreUpdateInterval");
//laser trigger class name
if ( config.GetConfigurationMap()->GetValue("LaserTriggerName") ) {
laserTriggerName=config.GetConfigurationMap()->GetValue("LaserTriggerName")->GetName();
- printf("TPCRAWda: Laser trigger class name set to: %s.\n",laserTriggerName.Data());
+ printf("TPCQAda: Laser trigger class name set to: %s.\n",laserTriggerName.Data());
}
//force laser trigger id
if ( config.GetConfigurationMap()->GetValue("ForceLaserTriggerId") ) {
forceLaserTriggerId=config.GetConfigurationMap()->GetValue("ForceLaserTriggerId")->GetName();
- printf("TPCRAWda: Force laser trigger Id: %s.\n",forceLaserTriggerId.Data());
+ printf("TPCQAda: Force laser trigger Id: %s.\n",forceLaserTriggerId.Data());
+ }
+ //skip the amore part
+ if ( config.GetConfigurationMap()->GetValue("SkipAmore") ) {
+ skipAmore=((TObjString*)config.GetConfigurationMap()->GetValue("SkipAmore"))->GetString().Atoi();
+ printf("TPCQAda: Skip Amore set in config\n");
+ }
+ //monitoring Attributes
+ if ( config.GetConfigurationMap()->GetValue("MonitorAttributes") ) {
+ monitorAttributes=config.GetConfigurationMap()->GetValue("MonitorAttributes")->GetName();
+ printf("TPCQAda: Monitor attributes set in config: %s\n",monitorAttributes.Data());
}
-
//reject laser triggers in a global partition if we have interleaved laser events
unsigned char classId=0;
//TODO
//TODO: in the next release of daq put 49 back to 50!!!
//TODO
- for (unsigned char iclassId=0; iclassId<49; ++iclassId){
+ for (unsigned char iclassId=0; iclassId<50; ++iclassId){
if (iclassId==classId) continue; //exclude laser trigger
triggerClasses+=Form("%u|",(unsigned int)iclassId);
}
triggerClasses.Chop();
- char *table[5] = {"PHY","Y","*",const_cast<char*>(triggerClasses.Data()),NULL};
+ char *table[5] = {"PHY",
+ "Y",
+ const_cast<char*>(monitorAttributes.Data()),
+ const_cast<char*>(triggerClasses.Data()),NULL};
monitorDeclareTableExtended(table);
- printf("TPCRAWda: Using laser trigger class Id: %u\n",(unsigned int)classId);
- printf("TPCRAWda: Accepted trigger class Ids: %s\n",triggerClasses.Data());
+ printf("TPCQAda: Using laser trigger class Id: %u\n",(unsigned int)classId);
+ printf("TPCQAda: Accepted trigger class Ids: %s\n",triggerClasses.Data());
+ printf("TPCQAda: Monitor attributes used: %s\n",monitorAttributes.Data());
}
//
// sending to AMOREdb
if (stopWatch.RealTime()>updateInterval){
- SendToAmoreDB(&calibQA,runNb);
+ if (!skipAmore) SendToAmoreDB(&calibQA,runNb);
stopWatch.Start();
} else {
stopWatch.Continue();
//
//Send objects to the AMORE DB
//
- printf ("TPCQAda: AMORE part\n");
- SendToAmoreDB(&calibQA, runNb);
+ if (!skipAmore){
+ printf ("TPCQAda: AMORE part\n");
+ SendToAmoreDB(&calibQA, runNb);
+ }
return status;
}
Double_t updateInterval=30; //seconds
TString laserTriggerName("C0LSR-ABCE-NOPF-CENT");
TString forceLaserTriggerId("-1");
+ TString monitorAttributes=Form("%d",ATTR_ORIGINAL_EVENT);
+ Bool_t skipAmore=kFALSE;
//amore update interval
Double_t valConf=config.GetValue("AmoreUpdateInterval");
forceLaserTriggerId=config.GetConfigurationMap()->GetValue("ForceLaserTriggerId")->GetName();
printf("TPCRAWda: Force laser trigger Id: %s.\n",forceLaserTriggerId.Data());
}
+ //skip the amore part
+ if ( config.GetConfigurationMap()->GetValue("SkipAmore") ) {
+ skipAmore=((TObjString*)config.GetConfigurationMap()->GetValue("SkipAmore"))->GetString().Atoi();
+ printf("TPCRAWda: Skip Amore set in config\n");
+ }
+ //monitoring Attributes
+ if ( config.GetConfigurationMap()->GetValue("MonitorAttributes") ) {
+ monitorAttributes=config.GetConfigurationMap()->GetValue("MonitorAttributes")->GetName();
+ printf("TPCRAWda: Monitor attributes set in config: %s\n",monitorAttributes.Data());
+ }
//reject laser triggers in a global partition if we have interleaved laser events
//TODO
//TODO: in the next release of daq put 49 back to 50!!!
//TODO
- for (unsigned char iclassId=0; iclassId<49; ++iclassId){
+ for (unsigned char iclassId=0; iclassId<50; ++iclassId){
if (iclassId==classId) continue; //exclude laser trigger
triggerClasses+=Form("%u|",(unsigned int)iclassId);
}
triggerClasses.Chop();
- char *table[5] = {"PHY","Y","*",const_cast<char*>(triggerClasses.Data()),NULL};
+ char *table[5] = {"PHY",
+ "Y",
+ const_cast<char*>(monitorAttributes.Data()),
+ const_cast<char*>(triggerClasses.Data()),NULL};
monitorDeclareTableExtended(table);
printf("TPCRAWda: Using laser trigger class Id: %u\n",(unsigned int)classId);
printf("TPCRAWda: Accepted trigger class Ids: %s\n",triggerClasses.Data());
+ printf("TPCRAWda: Monitor attributes used: %s\n",monitorAttributes.Data());
}
//
calibRaw.ProcessEvent(event);
// sending to AMOREdb
if (stopWatch.RealTime()>updateInterval){
- SendToAmoreDB(&calibRaw,runNb);
+ if (!skipAmore) SendToAmoreDB(&calibRaw,runNb);
stopWatch.Start();
} else {
stopWatch.Continue();
//
//Send objects to the AMORE DB
//
- printf ("TPCRAWda: AMORE part\n");
- SendToAmoreDB(&calibRaw, runNb);
+ if (!skipAmore) {
+ printf ("TPCRAWda: AMORE part\n");
+ SendToAmoreDB(&calibRaw, runNb);
+ }
return status;
}