Changing once more (hopefully we get it correct this time...) the logic to trig the...
[u/mrichter/AliRoot.git] / ITS / StoreRespSDD.C
1 #if !defined(__CINT__) || defined(__MAKECINT__)
2 #include "AliCDBManager.h"
3 #include "AliITSresponseSDD.h"
4 #include "AliCDBMetaData.h"
5 #include "AliCDBStorage.h"
6 #include "AliCDBId.h"
7 #include "AliCDBPath.h"
8 #include "AliCDBEntry.h"
9 #endif
10
11 void StoreRespSDD(Int_t firstRun=0, Int_t lastRun=999999999 ){
12   ///////////////////////////////////////////////////////////////////////
13   // Macro to generate and store the calibration files for SDD         //
14   // Generates:                                                        //
15   //  1 file with the AliITSrespionseSDD object (RespSDD)              //
16   ///////////////////////////////////////////////////////////////////////
17   
18   if(!AliCDBManager::Instance()->IsDefaultStorageSet()) {
19     AliCDBManager::Instance()->SetDefaultStorage("local://OCDB");
20   }
21   
22
23   AliCDBMetaData *md = new AliCDBMetaData();
24   md->SetObjectClassName("AliITSresponse");
25   md->SetResponsible("Francesco Prino");
26   md->SetBeamPeriod(0);
27   md->SetComment("Simulated data");
28
29
30   AliCDBId idRespSDD("ITS/Calib/RespSDD",firstRun, lastRun);
31   AliITSresponseSDD* rd = new AliITSresponseSDD();
32   rd->SetSideATimeZero(54.3);
33   rd->SetSideCTimeZero(54.3);
34 //   rd->SetLayer3ATimeZero(235);
35 //   rd->SetLayer3CTimeZero(287);
36 //   rd->SetLayer4ATimeZero(202);
37 //   rd->SetLayer4CTimeZero(230);
38   for(Int_t iMod=240; iMod<500; iMod++) rd->SetDeltaVDrift(iMod,0.);
39
40   AliCDBManager::Instance()->GetDefaultStorage()->Put(rd, idRespSDD, md);  
41 }