+Bool_t AliHMPIDPreprocessor::ProcNoiseMap()
+{
+ //
+ // Goal: Process the Noise Map created by the HMP Physics DA to mask
+ // noisy channels from reconstruction and follow changes in accepatnce
+ // eg. DDL turn on/off after PEDESTAL run and between PHYSICS runs.
+ // Returns kFALSE on success
+
+ Bool_t stProcNoise=kFALSE;
+ TFile *fNoiseFile;
+ TH2F *hNoiseMap = 0x0;
+
+ TList *pNoiseSource=GetFileSources(kDAQ,"HmpPhysicsDaNoiseMap.root"); //get list of DAQ source names containing id "HmpPhysicsDaNoiseMap" --> defined in HMPIDphysda.cxx
+ if(!pNoiseSource) {Log(Form("ERROR: Retrieval of sources for noise map: HmpPhysicsDaNoiseMap.root is failed!")); return stProcNoise;}
+ if(!(TObjString*)pNoiseSource->At(0)) {Log(Form("ERROR: empty list received from DAQ Source!")); return stProcNoise;}
+
+ TString noiseFile = GetFile(kDAQ,Form("HmpPhysicsDaNoiseMap.root"),((TObjString*)pNoiseSource->At(0))->GetName());
+ if(noiseFile.Length()==0) {Log(Form("ERROR retrieving noise map file: HmpPhysicsDaNoiseMap.root")); return stProcNoise;}
+
+ fNoiseFile = TFile::Open(noiseFile.Data(),"read");
+ if(!fNoiseFile) {Log(Form("ERROR cannot open NoiseFile: %s!",noiseFile.Data())); return stProcNoise;}
+ hNoiseMap = (TH2F*) fNoiseFile->Get("hHmpNoiseMaps");
+
+ AliCDBMetaData metaDataHisto;
+ metaDataHisto.SetBeamPeriod(0);
+ metaDataHisto.SetResponsible("AliHMPIDPreprocessor");
+ metaDataHisto.SetComment("AliHMPIDPreprocessor stores the Noise Map object as Reference Data.");
+ AliInfo("Storing Reference Data");
+ stProcNoise = Store("Calib","NoiseMap",hNoiseMap,&metaDataHisto,0,kTRUE);
+ if(!stProcNoise) {
+ Log("HMPID - failure to store Noise Map data results in OCDB");
+ }
+ return stProcNoise;
+}//ProcNoiseMap
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++