new file to test SDigits
[u/mrichter/AliRoot.git] / EMCAL / MakeEMCALFullMisAlignment.C
index 8855e64..8689aac 100644 (file)
@@ -1,8 +1,11 @@
-void MakeEMCALFullMisAlignment(){
+enum SurveyDataType_t { kSurvey = 0, kDummy = 1};
+
+void MakeEMCALFullMisAlignment(TString geoname = "EMCAL_FIRSTYEARv1",TString surveyFilename = "emcal_survey_FIRSTYEARv1.txt",SurveyDataType_t type = kSurvey){
   // Create TClonesArray of full misalignment objects for EMCAL
   //
   const char* macroname = "MakeEMCALFullMisAlignment.C";
-  const AliEMCALGeometry *emcalGeom = AliEMCALGeometry::GetInstance(AliEMCALGeometry::GetDefaultGeometryName(),"");
+  if(geoname=="")geoname=AliEMCALGeometry::GetDefaultGeometryName();
+  const AliEMCALGeometry *emcalGeom = AliEMCALGeometry::GetInstance(geoname,"");
   if(!emcalGeom) {
     Error("MakeEMCALFullMisAlignment","Cannot obtain AliEMCALGeometry singleton\n");
     return;
@@ -40,7 +43,7 @@ void MakeEMCALFullMisAlignment(){
   }    
 
 
-  AliEMCALSurvey emcalSurvey("emcal_survey_data.txt");
+  AliEMCALSurvey emcalSurvey(surveyFilename,type);
   emcalSurvey.CreateAliAlignObjParams(alobj);
 
   // *************************    2nd step    ***************
@@ -61,7 +64,8 @@ void MakeEMCALFullMisAlignment(){
     // save in CDB storage
     AliCDBMetaData* md = new AliCDBMetaData();
     md->SetResponsible("Jennifer Klay");
-    md->SetComment("Full misalignment for EMCAL");
+    md->SetComment("Full misalignment for EMCAL_FIRSTYEAR based on survey information");
+    md->AddDateToComment();
     md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
     AliCDBId id("EMCAL/Align/Data",0,AliCDBRunRange::Infinity());
     storage->Put(array,id,md);