]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MONITOR/MONITORzmq/AliOnlineReconstruction.cxx
Do not include from subdirectories
[u/mrichter/AliRoot.git] / MONITOR / MONITORzmq / AliOnlineReconstruction.cxx
index 8c32c3137699afc4d165ce9ee5aad8c009c83b9b..d0ae91baa7cdeaaca339d48d5d0270dd5e1c3a74 100644 (file)
@@ -83,11 +83,11 @@ void AliOnlineReconstruction::StartOfRun()
       return;
     }
   gSystem->cd(recoBaseDir.Data());
-  // gSystem->cd("/");
+  
   cout<<"\n\nRetriving GRP\n\n"<<endl;
   TString gdcs;
   if (RetrieveGRP(gdcs) <= 0 || gdcs.IsNull()){return;}
-  //gSystem->cd(recoBaseDir.Data());
+  
   gSystem->Exec(Form("rm -fr run%d;mkdir run%d",fRun,fRun));
   gSystem->cd(Form("run%d",fRun));
 
@@ -104,9 +104,10 @@ int AliOnlineReconstruction::RetrieveGRP(TString &gdc)
        TString dbName =  fSettings.GetValue("logbook.db", DEFAULT_LOGBOOK_DB);
        TString user =  fSettings.GetValue("logbook.user", DEFAULT_LOGBOOK_USER);
        TString password = fSettings.GetValue("logbook.pass", DEFAULT_LOGBOOK_PASS);
-       TString cdbPath = fSettings.GetValue("cdb.defaultStorage", DEFAULT_CDB_STORAGE);
+       TString cdbPath;// = fSettings.GetValue("cdb.defaultStorage", DEFAULT_CDB_STORAGE);
 
        cdbPath = Form("local://%s",gSystem->pwd());
+       gSystem->Exec(Form("rm -fr %s/GRP",cdbPath.Data()));
        cout<<"CDB path for GRP:"<<cdbPath<<endl;
 
        Int_t ret=AliGRPPreprocessor::ReceivePromptRecoParameters(fRun, dbHost.Data(),
@@ -127,23 +128,33 @@ void AliOnlineReconstruction::SetupReco()
 
        /* Settings CDB */
        cout<<"\n\nSetting CDB manager parameters\n\n"<<endl;
-       fCDBmanager->SetRun(fRun);
+       //fCDBmanager->SetRun(fRun);
        cout<<"Set default storage"<<endl;
 
-       fCDBmanager->SetDefaultStorage(fSettings.GetValue("cdb.defaultStorage", DEFAULT_CDB_STORAGE));
+               fCDBmanager->SetDefaultStorage(fSettings.GetValue("cdb.defaultStorage", DEFAULT_CDB_STORAGE));
 
        fCDBmanager->Print();
-       cout<<"Set specific storage 1"<<endl;
+               cout<<"Set specific storage 1"<<endl;
        fCDBmanager->SetSpecificStorage(fSettings.GetValue( "cdb.specificStoragePath1", DEFAULT_CDB_SPEC_STORAGE_PATH1),  
-                                   fSettings.GetValue( "cdb.specificStorageValue1", DEFAULT_CDB_SPEC_STORAGE_VALUE1));
+                                           fSettings.GetValue( "cdb.specificStorageValue1", DEFAULT_CDB_SPEC_STORAGE_VALUE1));
        fCDBmanager->Print();
-       cout<<"Set specific storage 2"<<endl;
+cout<<"Set specific storage 2"<<endl;
        fCDBmanager->SetSpecificStorage(fSettings.GetValue( "cdb.specificStoragePath2", DEFAULT_CDB_SPEC_STORAGE_PATH2),  
                                    fSettings.GetValue( "cdb.specificStorageValue2", DEFAULT_CDB_SPEC_STORAGE_VALUE2));
        fCDBmanager->Print();
        cout<<"Set specific storage 3"<<endl;
        fCDBmanager->SetSpecificStorage(fSettings.GetValue( "cdb.specificStoragePath3", DEFAULT_CDB_SPEC_STORAGE_PATH3),  
                                    fSettings.GetValue( "cdb.specificStorageValue3", DEFAULT_CDB_SPEC_STORAGE_VALUE3));
+
+
+       //fCDBmanager->SetSpecificStorage("TPC/Calib//PreprocStatus","local:///local/cdb");
+       //fCDBmanager->SetSpecificStorage("TPC/Calib//HighVoltage","local:///local/cdb");
+       //fCDBmanager->SetSpecificStorage("TPC/Calib//Goofie","local:///local/cdb");
+       //fCDBmanager->SetSpecificStorage("GRP/CTP/LTUConfig","local:///local/cdb");
+
+
+       //fCDBmanager->SetSpecificStorage("GRP/CTP/Scalers","local:///local/cdb");
+
        fCDBmanager->Print();
 
        /* Reconstruction settings */  
@@ -165,6 +176,7 @@ void AliOnlineReconstruction::SetupReco()
        fAliReco->SetCleanESD(fSettings.GetValue( "reco.cleanESD",DEFAULT_RECO_CLEAN_ESD));
        fCDBmanager->Print();
        // init reco for given run
+       //fAliReco->SetOption("TPC","useHLTorRAW");
        fAliReco->InitRun(fDataSource.Data());
 }
 
@@ -209,7 +221,7 @@ void AliOnlineReconstruction::ReconstructionLoop()
              if (status){
                event = fAliReco->GetESDEvent();
                eventManager->Send(event,EVENTS_SERVER_PUB);
-               eventManager->SendAsXml(event,XML_PUB);
+               //eventManager->SendAsXml(event,XML_PUB);
 
                // sending RecPoints:
                /*
@@ -257,12 +269,18 @@ void AliOnlineReconstruction::ReconstructionLoop()
              }
              cout<<"clean"<<endl;
              fAliReco->CleanProcessedEvent();
+             /*      if(event)
+               {
+                 delete event;
+                 event=0;
+                 }*/
              cout<<"iEvent++"<<endl;
              iEvent++;
            }
          else
            {
              cout<<"No event after!"<<endl;
+             gQuit=true;
            }
        }
        cout<<"after while"<<endl;