Setting new FXS for DQM.
authorzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Sep 2011 15:52:43 +0000 (15:52 +0000)
committerzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Sep 2011 15:52:43 +0000 (15:52 +0000)
Implementing the necessary changes in the SHUTTLE Framework (to be tested in the nightly tests), and a
"trivial" example in the GRP pp reading the "TriggerClassesAndHistosToClone" entry to test the
new FXS (the processing is always successful for testing purposes).

13 files changed:
GRP/ShuttleInput/run000158496_GRP_DQM_TriggerClassesAndHistosToClone [new file with mode: 0644]
SHUTTLE/AliShuttle.cxx
SHUTTLE/AliShuttle.h
SHUTTLE/AliShuttleConfig.cxx
SHUTTLE/AliShuttleConfig.h
SHUTTLE/TestShuttle/AliTestShuttle.cxx
SHUTTLE/schema/DQMsys.ldif [new file with mode: 0644]
SHUTTLE/schema_prod/DQMsys.ldif [new file with mode: 0644]
STEER/CDB/AliPreprocessor.h
STEER/CDB/AliShuttleInterface.cxx
STEER/CDB/AliShuttleInterface.h
STEER/STEER/AliGRPPreprocessor.cxx
STEER/STEER/AliGRPPreprocessor.h

diff --git a/GRP/ShuttleInput/run000158496_GRP_DQM_TriggerClassesAndHistosToClone b/GRP/ShuttleInput/run000158496_GRP_DQM_TriggerClassesAndHistosToClone
new file mode 100644 (file)
index 0000000..75697d0
Binary files /dev/null and b/GRP/ShuttleInput/run000158496_GRP_DQM_TriggerClassesAndHistosToClone differ
index 9827269..8c86833 100644 (file)
@@ -96,9 +96,9 @@ fOutputRedirected(kFALSE)
        //
 
        if (!fConfig->IsValid()) AliFatal("********** !!!!! Invalid configuration !!!!! **********");
-       for(int iSys=0;iSys<4;iSys++) {
+       for(int iSys=0;iSys<5;iSys++) {
                fServer[iSys]=0;
-               if (iSys < 3)
+               if (iSys < 4)
                        fFXSlist[iSys].SetOwner(kTRUE);
        }
        fPreprocessorMap.SetOwner(kTRUE);
@@ -117,7 +117,7 @@ AliShuttle::~AliShuttle()
        //
 
        fPreprocessorMap.DeleteAll();
-       for(int iSys=0;iSys<4;iSys++)
+       for(int iSys=0;iSys<5;iSys++)
                if(fServer[iSys]) {
                        fServer[iSys]->Close();
                        delete fServer[iSys];
@@ -489,7 +489,7 @@ Bool_t AliShuttle::CleanReferenceStorage(const char* detector)
        
        if (!dirList) return kTRUE;
                        
-       if (dirList->GetEntries() < 3) 
+       if (dirList->GetEntries() < 3) // to be changed to 4?
        {
                delete dirList;
                return kTRUE;
@@ -1882,13 +1882,13 @@ void AliShuttle::CountOpenRuns()
        SendAlive();
        
        // check connection, in case connect
-       if (!Connect(3)) 
+       if (!Connect(4)) 
                return;
 
        TString sqlQuery;
        sqlQuery = Form("select count(*) from %s where shuttle_done=0", fConfig->GetShuttlelbTable());
        
-       TSQLResult* aResult = fServer[3]->Query(sqlQuery);
+       TSQLResult* aResult = fServer[4]->Query(sqlQuery);
        if (!aResult) {
                AliError(Form("Can't execute query <%s>!", sqlQuery.Data()));
                return;
@@ -1939,12 +1939,12 @@ Bool_t AliShuttle::QueryShuttleLogbook(const char* whereClause,
        entries.SetOwner(1);
 
        // check connection, in case connect
-       if (!Connect(3)) return kFALSE;
+       if (!Connect(4)) return kFALSE;
 
        TString sqlQuery;
        sqlQuery = Form("select * from %s %s order by run", fConfig->GetShuttlelbTable(), whereClause);
 
-       TSQLResult* aResult = fServer[3]->Query(sqlQuery);
+       TSQLResult* aResult = fServer[4]->Query(sqlQuery);
        if (!aResult) {
                AliError(Form("Can't execute query <%s>!", sqlQuery.Data()));
                return kFALSE;
@@ -2000,13 +2000,13 @@ AliShuttleLogbookEntry* AliShuttle::QueryRunParameters(Int_t run)
        //
 
        // check connection, in case connect
-       if (!Connect(3))
+       if (!Connect(4))
                return 0;
 
        TString sqlQuery;
        sqlQuery.Form("select * from %s where run=%d", fConfig->GetDAQlbTable(), run);
 
-       TSQLResult* aResult = fServer[3]->Query(sqlQuery);
+       TSQLResult* aResult = fServer[4]->Query(sqlQuery);
        if (!aResult) {
                Log("SHUTTLE", Form("Can't execute query <%s>!", sqlQuery.Data()));
                return 0;
@@ -2194,7 +2194,7 @@ const char* AliShuttle::GetFile(Int_t system, const char* detector,
        TString whereClause = Form("run=%d and detector=\"%s\" and fileId=\"%s\"",
                                                                GetCurrentRun(), detector, id);
 
-       if (system == kDAQ)
+       if (system == kDAQ || system == kDQM)
        {
                whereClause += Form(" and DAQsource=\"%s\"", source);
        }
@@ -2433,7 +2433,7 @@ TList* AliShuttle::GetFileSources(Int_t system, const char* detector, const char
        }
 
        TString sourceName = "";
-       if (system == kDAQ)
+       if (system == kDAQ || system == kDQM)
        {
                sourceName = "DAQsource";
        } else if (system == kHLT)
@@ -2592,7 +2592,7 @@ Bool_t AliShuttle::Connect(Int_t system)
 
        TString dbHost, dbUser, dbPass, dbName;
 
-       if (system < 3) // FXS db servers
+       if (system < 4) // FXS db servers
        {
                dbHost = Form("mysql://%s:%d", fConfig->GetFXSdbHost(system), fConfig->GetFXSdbPort(system));
                dbUser = fConfig->GetFXSdbUser(system);
@@ -2607,8 +2607,8 @@ Bool_t AliShuttle::Connect(Int_t system)
        }
 
        fServer[system] = TSQLServer::Connect(dbHost.Data(), dbUser.Data(), dbPass.Data());
-       if (!fServer[system] || !fServer[system]->IsConnected()) {
-               if(system < 3)
+               if (!fServer[system] || !fServer[system]->IsConnected()) {
+               if(system < 4)
                {
                AliError(Form("Can't establish connection to FXS database for %s",
                                        AliShuttleInterface::GetSystemName(system)));
@@ -2631,8 +2631,11 @@ Bool_t AliShuttle::Connect(Int_t system)
                case kHLT:
                        aResult = fServer[kHLT]->GetTables(dbName.Data());
                        break;
+               case kDQM:
+                       aResult = fServer[kDQM]->GetTables(dbName.Data());
+                       break;
                default:
-                       aResult = fServer[3]->GetTables(dbName.Data());
+                       aResult = fServer[4]->GetTables(dbName.Data());
                        break;
        }
 
@@ -2682,7 +2685,7 @@ Bool_t AliShuttle::UpdateTable()
                        const char* source = ((TObjString*) aFXSarray->At(1))->GetName();
 
                        TString whereClause;
-                       if (system == kDAQ)
+                       if (system == kDAQ || system == kDQM)
                        {
                                whereClause = Form("where run=%d and detector=\"%s\" and fileId=\"%s\" and DAQsource=\"%s\";",
                                                        GetCurrentRun(), fCurrentDetector.Data(), fileId, source);
@@ -2835,7 +2838,7 @@ Bool_t AliShuttle::UpdateShuttleLogbook(const char* detector, const char* status
        //
 
        // check connection, in case connect
-       if(!Connect(3)){
+       if(!Connect(4)){
                Log("SHUTTLE", "UpdateShuttleLogbook - Couldn't connect to DAQ Logbook.");
                return kFALSE;
        }
@@ -2881,7 +2884,7 @@ Bool_t AliShuttle::UpdateShuttleLogbook(const char* detector, const char* status
 
        // Query execution
        TSQLResult* aResult;
-       aResult = dynamic_cast<TSQLResult*> (fServer[3]->Query(sqlQuery));
+       aResult = dynamic_cast<TSQLResult*> (fServer[4]->Query(sqlQuery));
        if (!aResult) {
                Log("SHUTTLE", Form("UpdateShuttleLogbook - Can't execute query <%s>", sqlQuery.Data()));
                return kFALSE;
@@ -3477,12 +3480,12 @@ const char* AliShuttle::GetTriggerConfiguration()
        // Receives the trigger configuration from the DAQ logbook for the current run
        
        // check connection, if needed reconnect
-       if (!Connect(3)) 
+       if (!Connect(4)) 
                return 0;
 
        TString sqlQuery;
        sqlQuery.Form("SELECT configFile FROM logbook_trigger_config WHERE run = %d", GetCurrentRun());
-       TSQLResult* result = fServer[3]->Query(sqlQuery);
+       TSQLResult* result = fServer[4]->Query(sqlQuery);
        if (!result)
        {
                Log("SHUTTLE", Form("ERROR: Can't execute query <%s>!", sqlQuery.Data()));
@@ -3524,12 +3527,12 @@ const char* AliShuttle::GetCTPTimeParams()
        // Receives the CTP time parameters from the DAQ logbook for the current run
        
        // check connection, if needed reconnect
-       if (!Connect(3)) 
+       if (!Connect(4)) 
                return 0;
 
        TString sqlQuery;
        sqlQuery.Form("SELECT alignmentFile FROM logbook_trigger_config WHERE run = %d", GetCurrentRun());
-       TSQLResult* result = fServer[3]->Query(sqlQuery);
+       TSQLResult* result = fServer[4]->Query(sqlQuery);
        if (!result)
        {
                Log("SHUTTLE", Form("ERROR: Can't execute query <%s>!", sqlQuery.Data()));
@@ -3571,12 +3574,12 @@ const char* AliShuttle::GetTriggerDetectorMask()
        // Receives the trigger detector mask from DAQ logbook
        
        // check connection, if needed reconnect
-       if (!Connect(3)) 
+       if (!Connect(4)) 
                return 0;
 
        TString sqlQuery;
        sqlQuery.Form("SELECT BIN(BIT_OR(inputDetectorMask)) from logbook_trigger_clusters WHERE run = %d;", GetCurrentRun());
-       TSQLResult* result = fServer[3]->Query(sqlQuery);
+       TSQLResult* result = fServer[4]->Query(sqlQuery);
        if (!result)
        {
                Log("SHUTTLE", Form("ERROR: Can't execute query <%s>!", sqlQuery.Data()));
@@ -3760,13 +3763,13 @@ TString* AliShuttle::GetLTUConfig(const char* det)
        // Getting ltuFineDelay1, ltuFineDelay2, ltuBCDelay for detector det from logbook_detectors table in logbook
        //
        
-       if (!Connect(3)) 
+       if (!Connect(4)) 
                return 0;
 
        TString sqlQuery;
        sqlQuery.Form("select LTUFineDelay1, LTUFineDelay2, LTUBCDelayAdd from logbook_detectors WHERE run_number = %d and detector = \"%s\";", GetCurrentRun(),det);
 
-       TSQLResult* result = fServer[3]->Query(sqlQuery);
+       TSQLResult* result = fServer[4]->Query(sqlQuery);
        if (!result){
                Log("SHUTTLE","ERROR: No result found for the LTU configuration query");
                return 0x0;
index 27fc039..d738d51 100644 (file)
@@ -154,9 +154,9 @@ private:
        TString fCurrentDetector; // current detector
        Bool_t fFirstProcessing;  // processing this detector the first time in this run
 
-       TSQLServer *fServer[4];         // pointer to the three FXS + Run & Shuttle logbook servers
-       Bool_t fFXSCalled[3];           // FXS call status
-       TList  fFXSlist[3];             // List of files retrieved from each FXS
+       TSQLServer *fServer[5];         // pointer to the four FXS + Run & Shuttle logbook servers
+       Bool_t fFXSCalled[4];           // FXS call status
+       TList  fFXSlist[4];             // List of files retrieved from each FXS
        Int_t  fFXSError;               // Variable to keep track of any FXS errors; contains -1 for no error, kDAQ, kDCS, kHLT otherwise
 
        AliCDBEntry* fStatusEntry; // last CDB entry containing a AliShuttleStatus retrieved
index af7931e..2d24ca2 100644 (file)
@@ -576,7 +576,7 @@ AliShuttleConfig::AliShuttleConfig(const char* host, Int_t port,
        fDetectorList.SetOwner(0); //fDetectorList and fDetectorMap share the same object!
        fProcessedDetectors.SetOwner();
        
-       for (int i=0; i<5; i++)
+       for (int i=0; i<6; i++)
        {
                fAdmin[i] = new TObjArray(); 
                fAdmin[i]->SetOwner();
@@ -860,10 +860,10 @@ const TObjArray* AliShuttleConfig::GetAdmins(Int_t sys) const
 {
        //
        // returns collection of TObjString which represents the list of mail addresses
-       // of the system's administrator(s) (DAQ, DCS, HLT, Global, Amanda)
+       // of the system's administrator(s) (DAQ, DCS, HLT, Global, Amanda, DQM)
        //
 
-       if (sys < 0 || sys > 4) return 0;
+       if (sys < 0 || sys > 5) return 0;
        return fAdmin[sys];
 }
 
@@ -1185,13 +1185,13 @@ UInt_t AliShuttleConfig::SetGlobalConfig(TList* list)
 //______________________________________________________________________________________________
 UInt_t AliShuttleConfig::SetSysConfig(TList* list)
 {
-       // Set the online FXS configuration (DAQ + DCS + HLT)
+       // Set the online FXS configuration (DAQ + DCS + HLT + DQM)
 
 
        TLDAPEntry* anEntry = 0;
        TLDAPAttribute* anAttribute = 0;
        
-       if (list->GetEntries() != 3) 
+       if (list->GetEntries() != 4) 
        {
                AliError(Form("Wrong number of online systems found: %d !", list->GetEntries()));
                return 1;
@@ -1221,6 +1221,11 @@ UInt_t AliShuttleConfig::SetSysConfig(TList* list)
                        iSys = kHLT;
                        count += 100;
                }
+               else if (sysName == "DQM")
+               {
+                       iSys = kDQM; 
+                       count += 1000;
+               }
                
                anAttribute = anEntry->GetAttribute("dbHost");
                if (!anAttribute) {
@@ -1308,7 +1313,7 @@ UInt_t AliShuttleConfig::SetSysConfig(TList* list)
        
        }
        
-       if(count != 111) {
+       if(count != 1111) {
                AliError(Form("Wrong system configuration! (code = %d)", count));
                return 6;
        }
@@ -1321,7 +1326,7 @@ UInt_t AliShuttleConfig::SetPasswords(){
        
        AliInfo("Setting Passwords");
 
-       // Retrieving Passwords for DAQ lb, DAQ/DCS/HLT FXS
+       // Retrieving Passwords for DAQ lb, DAQ/DCS/HLT/DQM FXS
 
        ifstream *inputfile = new ifstream(fPasswdFilePath.Data());
        if (!*inputfile) {
@@ -1358,6 +1363,11 @@ UInt_t AliShuttleConfig::SetPasswords(){
                        nPwd++;
                        AliDebug(3,Form("HLT_DB: Password %s for %s found", password.Data(), system.Data()));
                }
+               else if (system.Contains("DQM_DB")){
+                       fFXSdbPass[3]=password;
+                       nPwd++;
+                       AliDebug(3,Form("DQM_DB: Password %s for %s found", password.Data(), system.Data()));
+               }
                else {
                        nPwdFake++;
                        AliDebug(3,Form("%i fake line(s) found in file %s", nPwdFake, fPasswdFilePath.Data()));
@@ -1369,7 +1379,7 @@ UInt_t AliShuttleConfig::SetPasswords(){
        inputfile->close();
        delete inputfile;
 
-       if (nPwd!=4){
+       if (nPwd!=5){
                AliError(Form("Wrong file for DAQ Logbook password found %s (some passwors missing), please Check!", fPasswdFilePath.Data()));
                return 2;
        }
@@ -1534,7 +1544,7 @@ void AliShuttleConfig::Print(Option_t* option) const
        result += "------------------------------------------------------\n";
        result += "FXS configuration\n\n";
 
-       for(int iSys=0;iSys<3;iSys++){
+       for(int iSys=0;iSys<4;iSys++){
                result += Form("*** %s ***\n", AliShuttleInterface::GetSystemName(iSys));
                result += Form("\tDB  host: %s:%d; \tUser: %s; \tName: %s; \tTable: %s\n",
                                                fFXSdbHost[iSys].Data(), fFXSdbPort[iSys], fFXSdbUser[iSys].Data(),
index 40ba456..c85b402 100644 (file)
@@ -21,7 +21,7 @@
 class AliShuttleConfig: public TObject {
 public:
        enum RunMode {kTest=0, kProd};
-        enum SystemCode { kDAQ = 0, kDCS, kHLT, kGlobal, kAmanda };
+        enum SystemCode { kDAQ = 0, kDCS, kHLT, kDQM, kGlobal, kAmanda};
        
        AliShuttleConfig(const char* host, Int_t port = LDAP_PORT,
                        const char* binddn = 0, const char* password = 0,
@@ -208,18 +208,18 @@ private:
        TString fRunTypelbTable;        // Table name of the Run typr logbook
        TString fPasswdFilePath;        // Path for the local file where the passwords are stored
 
-       TString fFXSHost[3];            // Host of the [DAQ, DCS, HLT] File eXchange Server
-       UInt_t  fFXSPort[3];            // Port of the [DAQ, DCS, HLT] File eXchange Server
-       TString fFXSUser[3];            // username of the [DAQ, DCS, HLT] File eXchange Server
-       TString fFXSPass[3];            // password of the [DAQ, DCS, HLT] File eXchange Server
-       TString fFXSBaseFolder[3];      // base folder of the [DAQ, DCS, HLT] File eXchange Server
+       TString fFXSHost[4];            // Host of the [DAQ, DCS, HLT, DQM] File eXchange Server
+       UInt_t  fFXSPort[4];            // Port of the [DAQ, DCS, HLT, DQM] File eXchange Server
+       TString fFXSUser[4];            // username of the [DAQ, DCS, HLT, DQM] File eXchange Server
+       TString fFXSPass[4];            // password of the [DAQ, DCS, HLT, DQM] File eXchange Server
+       TString fFXSBaseFolder[4];      // base folder of the [DAQ, DCS, HLT, DQM] File eXchange Server
 
-       TString fFXSdbHost[3];          // Host of the [DAQ, DCS, HLT] FXS database
-       UInt_t  fFXSdbPort[3];          // Port of the [DAQ, DCS, HLT] FXS database
-       TString fFXSdbUser[3];          // username of the [DAQ, DCS, HLT] FXS database
-       TString fFXSdbPass[3];          // password of the [DAQ, DCS, HLT] FXS database
-       TString fFXSdbName[3];          // name of the [DAQ, DCS, HLT] FXS database
-       TString fFXSdbTable[3];         // Table name of the [DAQ, DCS, HLT] FXS database
+       TString fFXSdbHost[4];          // Host of the [DAQ, DCS, HLT, DQM] FXS database
+       UInt_t  fFXSdbPort[4];          // Port of the [DAQ, DCS, HLT, DQM] FXS database
+       TString fFXSdbUser[4];          // username of the [DAQ, DCS, HLT, DQM] FXS database
+       TString fFXSdbPass[4];          // password of the [DAQ, DCS, HLT, DQM] FXS database
+       TString fFXSdbName[4];          // name of the [DAQ, DCS, HLT, DQM] FXS database
+       TString fFXSdbTable[4];         // Table name of the [DAQ, DCS, HLT, DQM] FXS database
 
        TString fTerminateFilePath;     // File for inter-process communcation to terminate the Shuttle
 
@@ -245,7 +245,7 @@ private:
        TMap fDetectorMap;              // Map of the detector-by-detector configuration
        TObjArray fDetectorList;        // List of detectors with valid configuration
        
-       TObjArray *fAdmin[5];           // Array of system administrators' email addresses (DAQ, DCS, HLT, Global, Amanda)
+       TObjArray *fAdmin[6];           // Array of system administrators' email addresses (DAQ, DCS, HLT, DQM, Global, Amanda)
 
        TString fShuttleInstanceHost;   // Instance of the SHUTTLE
        TObjArray fProcessedDetectors;  // list of the detector to be processed by this machine
index 12aefad..a1de133 100644 (file)
@@ -355,7 +355,7 @@ const char* AliTestShuttle::GetRefFilePrefix(const char* base, const char* detec
 //______________________________________________________________________________________________
 const char* AliTestShuttle::GetFile(Int_t system, const char* detector, const char* id, const char* source)
 {
-  // This function retrieves a file from the given system (kDAQ, kDCS, kHLT) with the given file id
+  // This function retrieves a file from the given system (kDAQ, kDCS, kHLT, kDQM) with the given file id
   // and from the given source in the system.
   // The function returnes the path to the local file.
   //
diff --git a/SHUTTLE/schema/DQMsys.ldif b/SHUTTLE/schema/DQMsys.ldif
new file mode 100644 (file)
index 0000000..6b643cd
--- /dev/null
@@ -0,0 +1,23 @@
+version: 1
+
+# LDIF Export for: system=DQM,o=shuttle,dc=cern,dc=ch
+# Generated by phpLDAPadmin ( http://phpldapadmin.sourceforge.net/ ) on September 26, 2011 5:59 pm
+# Server: SHUTTLE (pcalishuttle02.cern.ch)
+# Search Scope: sub
+# Search Filter: (objectClass=*)
+# Total Entries: 1
+
+dn: system=DQM,o=shuttle,dc=cern,dc=ch
+dbHost: alice-logbook-copy.cern.ch
+dbName: TEST_FXS_DQM
+dbTable: daqFES_files
+dbUser: shuttle_test_rw
+fxsBaseFolder: /home/shuttle_test_rw/TEST_FXS_DQM
+fxsHost: alice-logbook-copy.cern.ch
+fxsUser: shuttle_test_rw
+system: DQM
+dbPort: 3306
+fxsAdmin: bartolomeu.rodrigues.fernandes.rabacal@cern.ch
+fxsPort: 22
+objectClass: fxsConfig
+objectClass: top
diff --git a/SHUTTLE/schema_prod/DQMsys.ldif b/SHUTTLE/schema_prod/DQMsys.ldif
new file mode 100644 (file)
index 0000000..3c715dc
--- /dev/null
@@ -0,0 +1,23 @@
+version: 1
+
+# LDIF Export for: system=DQM,o=shuttle_prod,dc=cern,dc=ch
+# Generated by phpLDAPadmin ( http://phpldapadmin.sourceforge.net/ ) on September 26, 2011 6:00 pm
+# Server: SHUTTLE (pcalishuttle02.cern.ch)
+# Search Scope: sub
+# Search Filter: (objectClass=*)
+# Total Entries: 1
+
+dn: system=DQM,o=shuttle_prod,dc=cern,dc=ch
+dbHost: aldaqgw01-gpn.cern.ch
+dbName: FES
+dbTable: daqFES_files
+dbUser: shuttle
+fxsBaseFolder: /home/shuttle/FES
+fxsHost: aldaqgw01-gpn.cern.ch
+fxsUser: shuttle
+system: DQM
+dbPort: 1447
+fxsAdmin: bartolomeu.rodrigues.fernandes.rabacal@cern.ch
+fxsPort: 1448
+objectClass: fxsConfig
+objectClass: top
index 9cd1835..f8cacd8 100644 (file)
@@ -26,7 +26,7 @@ class AliPreprocessor : public TNamed
 {
   public:
 
-    enum { kDAQ = 0, kDCS, kHLT };
+       enum { kDAQ = 0, kDCS, kHLT, kDQM };
 
     AliPreprocessor(const char* detector, AliShuttleInterface* shuttle);
     virtual ~AliPreprocessor();
index ba3ae1c..437eaac 100644 (file)
@@ -28,7 +28,7 @@
 
 ClassImp(AliShuttleInterface)
 
-const char* AliShuttleInterface::fkSystemNames[3] = { "DAQ", "DCS", "HLT" };
+       const char* AliShuttleInterface::fkSystemNames[4] = { "DAQ", "DCS", "HLT", "DQM" };
 
 // names of the detectors preprocessors
 const char* AliShuttleInterface::fgkDetName[kNDetectors] = {"SPD", "SDD", "SSD", "TPC", "TRD", "TOF",
index 8204582..40bf087 100644 (file)
@@ -22,7 +22,7 @@ class AliCDBEntry;
 class AliShuttleInterface : public TObject
 {
   public:
-    enum System { kDAQ = 0, kDCS, kHLT };
+       enum System { kDAQ = 0, kDCS, kHLT, kDQM };
     enum { kNDetectors = 21 }; // number of subdetectors in ALICE
 
     virtual Bool_t Store(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData,
@@ -51,7 +51,7 @@ class AliShuttleInterface : public TObject
 
     virtual void RegisterPreprocessor(AliPreprocessor* preprocessor) = 0;
 
-    static const char* GetSystemName(UInt_t system) {return (system < 3) ? fkSystemNames[system] : 0;}
+    static const char* GetSystemName(UInt_t system) {return (system < 4) ? fkSystemNames[system] : 0;}
 
     static const char* GetOfflineDetName(const char* detName);
     static const char* GetDetName(UInt_t detPos);
@@ -71,7 +71,7 @@ class AliShuttleInterface : public TObject
 
   protected:
 
-    static const char* fkSystemNames[3];               // names of the systems providing data to the shuttle
+    static const char* fkSystemNames[4];               // names of the systems providing data to the shuttle
     static const char* fgkDetName[kNDetectors];        // names of detectors' preprocessors (3-letter code convention)
     static const char* fgkOfflineDetName[kNDetectors];  // names of detectors in OCDB (AliRoot naming convention)
 
index fcd2f4c..159e9bc 100644 (file)
@@ -204,7 +204,8 @@ ClassImp(AliGRPPreprocessor)
                   "(DCS FXS Error for LHC Data)",
                   "(LHC Data Error)",
                   "(LHC Clock Phase Error (from LHC Data))",
-                  "(LTU Configuration Error)"
+                  "(LTU Configuration Error)",
+                  "(DQM Failure)"
   };
 
 //_______________________________________________________________
@@ -660,6 +661,20 @@ UInt_t AliGRPPreprocessor::Process(TMap* valueMap)
                Log("SPD Mean Vertex not processed since runType != PHYSICS");
        }
 
+       //=================//
+       // DQM FXS         //
+       //=================//
+
+       Log("*************** Processing DQM FXS");
+
+       UInt_t iDqmFxs = ProcessDqmFxs();
+       if( iDqmFxs == 1 ) {
+               Log(Form("DQM FXS, successful!"));
+       } else {
+               Log(Form("DQM FXS failed!!!"));
+               error |= 4096;
+       }
+
        // storing AliGRPObject in OCDB
 
        AliCDBMetaData md;
@@ -674,7 +689,7 @@ UInt_t AliGRPPreprocessor::Process(TMap* valueMap)
                Log("GRP Preprocessor Success");
                return 0;
        } else {
-               Log( Form("GRP Preprocessor FAILS!!! %s%s%s%s%s%s%s%s%s%s%s%s",
+               Log( Form("GRP Preprocessor FAILS!!! %s%s%s%s%s%s%s%s%s%s%s%s%s",
                          kppError[(error&1)?1:0],
                          kppError[(error&2)?2:0],
                          kppError[(error&4)?3:0],
@@ -686,7 +701,8 @@ UInt_t AliGRPPreprocessor::Process(TMap* valueMap)
                          kppError[(error&256)?9:0],
                          kppError[(error&512)?10:0],
                          kppError[(error&1024)?11:0],
-                         kppError[(error&2048)?12:0]
+                         kppError[(error&2048)?12:0],
+                         kppError[(error&4096)?12:0]
                          ));
                return error;
        }
@@ -1303,6 +1319,52 @@ UInt_t AliGRPPreprocessor::ProcessSPDMeanVertex()
 
        return storeResult;
 }
+//_______________________________________________________________
+
+UInt_t AliGRPPreprocessor::ProcessDqmFxs()
+{
+       //
+       // Processing DQM fxs information
+       //
+
+       TList* list = GetFileSources(kDQM, "TriggerClassesAndHistosToClone");
+       Bool_t storeResult = kTRUE;
+       if (list !=0x0 && list->GetEntries()!=0){
+               AliInfo("The following sources produced files with the id TriggerClassesAndHistosToClone for GRP");
+               list->Print();
+               for (Int_t jj=0;jj<list->GetEntries();jj++){
+                       TObjString * str = dynamic_cast<TObjString*> (list->At(jj)); 
+                       if (!str){
+                               AliError(Form("Expecting a TObjString in the list for the %d-th source, but something else was found.",jj));
+                               continue;
+                       }
+                       AliInfo(Form("found source %s", str->String().Data()));
+                       TString fileNameRun = GetFile(kDQM, "TriggerClassesAndHistosToClone", str->GetName());
+                       if (fileNameRun.Length()>0){
+                               AliInfo(Form("Got the file %s", fileNameRun.Data()));
+                               TFile dqmFile(fileNameRun.Data(),"READ");
+                               if (dqmFile.IsOpen()) {
+                                       dqmFile.ls();
+                               }
+                               else {
+                                       AliError("Can't open file");
+                                       storeResult = kFALSE;
+                               }
+                       }
+                       else{
+                               AliWarning("No file found for current source for DQM TriggerClassesAndHistosToClone");
+                       }
+               }
+       }
+       else {
+               AliWarning("No list found for DQM TriggerClassesAndHistosToClone");
+       }
+       
+       if (list) delete list;
+       
+       //      return storeResult;
+       return kTRUE;  // temporary!!
+}
 
 
 //_______________________________________________________________
@@ -1393,7 +1455,6 @@ Int_t AliGRPPreprocessor::ProcessDaqLB(AliGRPObject* grpObj)
 
        return nparameter;
 }
-
 //_______________________________________________________________
 
 UInt_t AliGRPPreprocessor::ProcessDaqFxs()
index f9a677b..da9ff1b 100644 (file)
@@ -83,6 +83,7 @@ class AliGRPPreprocessor: public AliPreprocessor {
 
                Int_t   ProcessDaqLB(AliGRPObject* grpobj);
               UInt_t   ProcessDaqFxs();
+              UInt_t   ProcessDqmFxs();
               UInt_t   ProcessSPDMeanVertex();
               UInt_t   ProcessLHCData(AliGRPObject* grpobj);
               UInt_t   ProcessDcsFxs(TString partition="", TString detector="");