当前位置: 首页>>代码示例>>C++>>正文


C++ AliCDBMetaData::SetComment方法代码示例

本文整理汇总了C++中AliCDBMetaData::SetComment方法的典型用法代码示例。如果您正苦于以下问题:C++ AliCDBMetaData::SetComment方法的具体用法?C++ AliCDBMetaData::SetComment怎么用?C++ AliCDBMetaData::SetComment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AliCDBMetaData的用法示例。


在下文中一共展示了AliCDBMetaData::SetComment方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: MakeADLightYieldsEntry

void MakeADLightYieldsEntry(const char *outputCDB = "local://$ALICE_ROOT/../AliRoot/OCDB")
{

  AliCDBManager *man = AliCDBManager::Instance();
  man->SetDefaultStorage(outputCDB);

  // Creation of the light yields OCDB object
  const Double_t lightYieldCorr[18] = {0.0,
				       2.2e-4,2.2e-4,2.2e-4,2.2e-4, 2.2e-4,2.2e-4,2.2e-4,2.2e-4,
                                       2.4e-4,2.4e-4,2.6e-4,2.6e-4, 2.4e-4,2.4e-4,2.6e-4,2.6e-4,
				       0.0};

  TH1F *yields = new TH1F("ADLightYields", "AD Light Yields", 16, -0.5, 15.5);
  yields->SetContent(lightYieldCorr);

  AliCDBMetaData *md = new AliCDBMetaData(); // metaData describing the object
  md->SetResponsible("Michal Broz");
  md->SetBeamPeriod(0);
  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
  md->SetComment("Light Yields channel by channel");
  md->PrintMetaData();

  AliCDBId id("AD/Calib/LightYields", 0, AliCDBRunRange::Infinity());
  man->Put(yields, id, md);

  delete md;

}
开发者ID:alisw,项目名称:AliRoot,代码行数:28,代码来源:MakeADLightYieldsEntry.C

示例2: MakeLHCClockPhaseEntry

void MakeLHCClockPhaseEntry(const char *cdbStorage = "local://$ALICE_ROOT/OCDB")
{
  // Example macro to put in OCDB the default (=0) LHC-clock phase
  // It is valid fro runs from 0 to inf
  // The timestamp range is also inf (we store the first and last value for
  // each beam)
  AliCDBManager *man = AliCDBManager::Instance();
  man->SetDefaultStorage(cdbStorage);

  AliLHCClockPhase phaseObj;

  phaseObj.AddPhaseB1DP(0,0.);
  phaseObj.AddPhaseB2DP(0,0.);

  phaseObj.AddPhaseB1DP(2147483647,0.);
  phaseObj.AddPhaseB2DP(2147483647,0.);

  AliCDBMetaData* metadata = new AliCDBMetaData();
  metadata->SetResponsible("Cvetan Cheshkov");
  metadata->SetComment("Default LHC-clock phase object");
  AliCDBId id("GRP/Calib/LHCClockPhase",0,AliCDBRunRange::Infinity());

  man->Put(&phaseObj,id,metadata);

  return;
}
开发者ID:alisw,项目名称:AliRoot,代码行数:26,代码来源:MakeLHCClockPhaseEntry.C

示例3: OccupancyAscii2OCDB

void OccupancyAscii2OCDB(Int_t runNumber,
                         TObjArray& filenames,
                         const char* ocdbpath,
                         const char* comment)
{
    AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
    AliCDBManager::Instance()->SetRun(runNumber);
    AliCDBManager::Instance()->SetSpecificStorage("MUON/Calib/OccupancyMap",ocdbpath);
    AliMpCDB::LoadAll();

    AliMUON2DMap occupancy(kTRUE);

    TObjString* str;
    TIter next(&filenames);
    while ( ( str = static_cast<TObjString*>(next()) ) )
    {
        TString data;
        ReadOccupancyFile(str->String().Data(),data);

        AliMUONTrackerIO::DecodeOccupancy(data.Data(),occupancy);
    }

    if (occupancy.GetSize())
    {
        AliCDBId id("MUON/Calib/OccupancyMap",runNumber,runNumber);

        AliCDBMetaData metaData;
        metaData.SetBeamPeriod(0);
        metaData.SetResponsible("MUON TRK");
        metaData.SetComment(comment);

        AliCDBManager::Instance()->Put(&occupancy,id,&metaData);
    }
}
开发者ID:aphecetche,项目名称:acode,代码行数:34,代码来源:OccupancyAscii2OCDB.C

示例4: id

MakeCDBEntryTriggerMask(Int_t startRun = 0, Int_t endRun = AliCDBRunRange::Infinity())
{

  UInt_t triggerMask[72];
  for (Int_t i = 0; i < 72; i++)
    triggerMask[i] = 0xffffff;

  /* create object */
  AliTOFTriggerMask *obj = new AliTOFTriggerMask();
  obj->SetTriggerMaskArray(triggerMask);

  /* create cdb info */
  AliCDBId id("TRIGGER/TOF/TriggerMask", startRun, endRun);
  AliCDBMetaData *md = new AliCDBMetaData();
  md->SetResponsible("Roberto Preghenella");
  md->SetComment("TOF Trigger Mask");
  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
  md->SetBeamPeriod(0);

  /* put object in cdb */
  AliCDBManager *cdb = AliCDBManager::Instance();
  cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  cdb->GetDefaultStorage()->Put(obj, id, md);

}
开发者ID:alisw,项目名称:AliRoot,代码行数:25,代码来源:MakeCDBEntryTriggerMask.C

示例5: MakeQAThresholdsEntry

void MakeQAThresholdsEntry(const char* storageUri="local://$ALICE_ROOT/../AliRoot/OCDB", Int_t firstRun=0, Int_t lastRun=999999999)
{
  AliCDBManager *cdb = AliCDBManager::Instance();
  cdb->SetDefaultStorage(storageUri);
  // QAThresholds
  TObjArray* qaThrArray = new TObjArray();
  for (Int_t idet = 0; idet < AliDAQ::kNDetectors; idet++){
    TString detName = AliDAQ::OnlineName(idet);
    if (detName == "TRI" || detName == "HLT" || detName == "TST") continue;   // skipping TRI, HLT, TST since they do not produce QAThresholds
    Printf("Processing QAThreshold for detector %s",detName.Data()); 
    TString inFile(gSystem->ExpandPathName("$ALICE_ROOT/../AliRoot/GRP/ShuttleInput/"));
    inFile += "run000168322_";
    inFile += detName;
    inFile += "_DQM_QAThresholds";
    Printf("Opening QAThreshold file %s", inFile.Data());
    TFile dqmFile(inFile.Data(),"READ");
    if (dqmFile.IsOpen()) {
      AliQAThresholds* qaThr = dynamic_cast<AliQAThresholds*>(dqmFile.Get(detName.Data()));
      if (qaThr){
        Int_t qaThrId = qaThr->GetDetectorId();
        if (qaThrId != idet){
          Printf("ERROR: Expecting QA threshold for detector %s, but found that for detector %s, skipping",detName.Data(), AliDAQ::OnlineName(qaThrId));
          continue;
        }
        else{
          qaThrArray->AddAtAndExpand(qaThr, qaThrId);
        }
      }
      else {
        Printf("ERROR: No QAThresholds object found in the file for detector %s, skipping",detName.Data());
        continue;
      }
    }
    else {
      Printf("ERROR: Can't open QAThreshold file for detector %s, skipping",detName.Data());
      continue;					
    }
  }
  if (qaThrArray->GetEntries() > 0){
    AliCDBMetaData md;
    md.SetResponsible("Barthélémy von Haller");
    md.SetComment("QA Threshold TObjArray");
    AliCDBId id("GRP/Calib/QAThresholds", firstRun, lastRun);
    cdb->Put(qaThrArray, id, &md); 
  }
  else{
    Printf("No valid QAThresholds entries found, storing nothing in the OCDB");
  }

}
开发者ID:alisw,项目名称:AliRoot,代码行数:50,代码来源:MakeQAThresholdsEntry.C

示例6: WriteDCSAliasMap

void WriteDCSAliasMap()
{
  // This writes the output from CreateDCSAliasMap to a CDB file

  TMap* dcsAliasMap = CreateDCSAliasMap();

  AliCDBMetaData metaData;
	metaData.SetBeamPeriod(0);
	metaData.SetResponsible("Responsible person");
	metaData.SetComment("Test object for TestPreprocessor.C");

  AliCDBId id("DET/DCS/Data", 0, 0);

  // look into AliTestShuttle's CDB main folder

  AliCDBManager::Instance()->GetStorage(AliShuttleInterface::GetMainCDB())
  			->Put(dcsAliasMap, id, &metaData);
}
开发者ID:ktf,项目名称:AliRoot,代码行数:18,代码来源:ADTestPreprocessor.C

示例7: id

MakeCDBEntryCTPLatency(Float_t value = 0., Int_t startRun = 0, Int_t endRun = AliCDBRunRange::Infinity())
{

  /* create object */
  AliTOFCTPLatency *obj = new AliTOFCTPLatency();
  obj->SetCTPLatency(value);

  /* create cdb info */
  AliCDBId id("TOF/Calib/CTPLatency", startRun, endRun);
  AliCDBMetaData *md = new AliCDBMetaData();
  md->SetResponsible("Roberto Preghenella");
  md->SetComment("CTPLatency (ps)");
  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
  md->SetBeamPeriod(0);

  /* put object in cdb */
  AliCDBManager *cdb = AliCDBManager::Instance();
  cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  cdb->GetDefaultStorage()->Put(obj, id, md);

}
开发者ID:alisw,项目名称:AliRoot,代码行数:21,代码来源:MakeCDBEntryCTPLatency.C

示例8: MakeMFTZeroMisAlignment

void MakeMFTZeroMisAlignment(TString Storage = "alien://folder=/alice/cern.ch/user/a/auras/OCDB/") {

  // Create TClonesArray of zero misalignment objects for MFT

  const char* macroname = "MakeMFTZeroMisAlignment.C";

  TClonesArray *array = new TClonesArray("AliAlignObjParams",10);
  TClonesArray &alobj = *array;

  Double_t dx=0, dy=0, dz=0, dpsi=0, dtheta=0, dphi=0;

  Int_t iIndex=0;
  AliGeomManager::ELayerID iLayer = AliGeomManager::kInvalidLayer;
  UShort_t volid = AliGeomManager::LayerToVolUID(iLayer,iIndex);

  TString MFT("MFT");
  new (alobj[0]) AliAlignObjParams(MFT.Data(), volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);

  // save in CDB storage
  if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) {
    Error(macroname,"STORAGE variable set to %s is not valid. Exiting\n",Storage.Data());
    return;
  }
  Info(macroname,"Saving alignment objects in CDB storage %s", Storage.Data());
  AliCDBManager* cdb = AliCDBManager::Instance();
  AliCDBStorage* storage = cdb->GetStorage(Storage.Data());
  if(!storage){
    Error(macroname,"Unable to open storage %s\n",Storage.Data());
    return;
  }
  AliCDBMetaData* md = new AliCDBMetaData();
  md->SetResponsible("Antonio Uras");
  md->SetComment("Alignment objects for MFT zero-misalignment");
  md->SetAliRootVersion(gROOT->GetVersion());
  AliCDBId id("MFT/Align/Data",0,AliCDBRunRange::Infinity());
  storage->Put(array,id,md);

  array->Delete();

}
开发者ID:alisw,项目名称:AliRoot,代码行数:40,代码来源:MakeMFTZeroMisAlignment.C

示例9: id

UpdateRecoParam(const Int_t runNumber)
{
  // Read the array of PHOS recoparam objects from OCDB and update
  // EMC fitter version to "v4".
  // Write the updated object to OCDB.
  // Yuri Kharlov. 9.12.2011
  //
  /* $Id$ */

  AliCDBManager::Instance()->SetDefaultStorage("raw://");
  AliCDBManager::Instance()->SetRun(runNumber);

  AliCDBEntry* cdbEntry = AliCDBManager::Instance()->Get("PHOS/Calib/RecoParam");
  AliCDBMetaData *md = cdbEntry->GetMetaData();
  cout << "Responsible: " << md->GetResponsible() << endl;
  cout << "MD Comment : " << md->GetComment() << endl;
  TObjArray* arrayRecoParam = (TObjArray*)cdbEntry->GetObject();

  cout << "N recoparam = " << arrayRecoParam->GetEntries() << endl;

  AliPHOSRecoParam *rp = 0;
  for (Int_t i=0; i<arrayRecoParam->GetEntries(); i++) {
    rp = (AliPHOSRecoParam*)arrayRecoParam->At(i);
    printf("RP %d: event specie = %d, fitter version = %s\n",
	   i,rp->GetEventSpecie(),rp->EMCFitterVersion());
    rp->SetEMCFitterVersion("v4");
  }

  // Writing new recoparam to OCDB

  AliCDBManager* cdb = AliCDBManager::Instance();
  cdb->SetDefaultStorage("local://OCDB");

  AliCDBMetaData *md= new AliCDBMetaData();
  md->SetResponsible("Yuri Kharlov");
  md->SetComment("PHOS recoparameters: EMC fitter version is updated to v4");
  AliCDBId id("PHOS/Calib/RecoParam",167690,AliCDBRunRange::Infinity());
  cdb->Put(arrayRecoParam,id, md);

}
开发者ID:alisw,项目名称:AliRoot,代码行数:40,代码来源:UpdateRecoParam.C

示例10: SetOCDBFromRun1

///
/// Main method
///
/// \param year: year to set geometry and run range
/// \param printAll: verbosity checks 
///
void SetOCDBFromRun1(Int_t year = 2010, Bool_t printAll = kFALSE)
{  
  TGrid::Connect("alien://");
  
  Int_t run = 182325; //2012
  if(year == 2010) run = 134908;
  if(year == 2011) run = 159582;
  
  AliCDBManager* man = AliCDBManager::Instance();
  man->SetDefaultStorage("raw://");
  man->SetRun(run);
  AliCDBStorage *storage = man->GetDefaultStorage();
  
  // Instantiate EMCAL geometry for the first time
  AliEMCALGeometry * geom;
  if     (year == 2010) geom = AliEMCALGeometry::GetInstance("EMCAL_FIRSTYEARV1"); // 2010
  else                  geom = AliEMCALGeometry::GetInstance("EMCAL_COMPLETEV1");  // 2011-2012-2013
//else                  geom = AliEMCALGeometry::GetInstance("EMCAL_COMPLETE12SMV1_DCAL_8SM"); // Run2

  const Int_t nSM = geom->GetNumberOfSuperModules();
  
  // Get the final OCDB object
  
  AliEMCALCalibData* cparam = (AliEMCALCalibData*) (storage->Get("EMCAL/Calib/Data", run)->GetObject());

  // Access OCDB file with the first version of the calibration
  TString        first = "Run177115_999999999_v2_s0.root";
  if(year==2010) first = "Run113461_999999999_v3_s0.root";
  if(year==2011) first = "Run144484_999999999_v3_s0.root";
  
  TFile * f = TFile::Open(Form("alien:///alice/data/%d/OCDB/EMCAL/Calib/Data/%s",year,first.Data()),"READ");
  AliCDBEntry * cdb = (AliCDBEntry*) f->Get("AliCDBEntry");
  AliEMCALCalibData* cparam1 = (AliEMCALCalibData*)  cdb->GetObject();
  
  // New OCDB container
  AliEMCALCalibData *cparamnew=new AliEMCALCalibData("EMCAL");
  
  // Do the comparison
  Float_t param  = -1;
  Float_t param1 = -1;
  Int_t iCol = -1, iRow = -1, iSM =-1, iMod = -1,iIphi =-1,iIeta = -1;
  for(Int_t i=0;i < nSM*24*48; i++)
  {
    //printf("AbsID %d\n",i);
    geom->GetCellIndex(i,iSM,iMod,iIphi,iIeta);
    geom->GetCellPhiEtaIndexInSModule(iSM,iMod, iIphi, iIeta,iRow,iCol);
    
    Float_t param = -1;
    if( cparam  ) param  = cparam ->GetADCchannel(iSM,iCol,iRow);
    
    Float_t param1 = -1;
    if( cparam1 ) param1 = cparam1->GetADCchannel(iSM,iCol,iRow);
    
    if    (printAll)
      printf("ID %d, col %d, row %d, sm %d  final %1.4f, first %1.4f\n",
             i,iCol,iRow,iSM,param, param1);
    cparamnew->SetADCchannel      (iSM,iCol,iRow,param );
    cparamnew->SetADCchannelOnline(iSM,iCol,iRow,param1);
  }
  
  // Create OCDB File
  AliCDBMetaData md;
  md.SetComment("Calibration after calibration with pi0, store also first online calibration");
  md.SetBeamPeriod(0);
  md.SetResponsible("Gustavo Conesa");
  md.SetAliRootVersion(gSystem->Getenv("ARVERSION"));
  
  // Careful, select here the first run where this calibration is valid
  Int_t            firstRun = 172439; // 2012-13
  if(year == 2010) firstRun = 113461;
  if(year == 2011) firstRun = 144484;
  
  AliCDBId id("EMCAL/Calib/Data",firstRun,AliCDBRunRange::Infinity()); // create in EMCAL/Calib/Data DBFolder
  
  AliCDBManager* man2 = AliCDBManager::Instance();
  AliCDBStorage* loc = man2->GetStorage(Form("local://%d",year));
  loc->Put(cparamnew, id, &md);
}
开发者ID:alisw,项目名称:AliRoot,代码行数:84,代码来源:SetOCDBFromRun1.C

示例11: MakeLHCDataEntry


//.........这里部分代码省略.........
          while (iDataQuality < nDataQuality){
            Printf("iDataQuality = %d",iDataQuality);
            AliDCSArray* dataQuality = (AliDCSArray*)dataQualityArray->At(iDataQuality);
            if (dataQuality->GetTimeStamp()>=timeDataQualityStart && dataQuality->GetTimeStamp()<=timeEnd){ // considering only values between the first valid and the end of the run
              Bool_t dataQualityFlag = dataQuality->GetBool(0);
              Printf("DataQuality = %d (set at %f)",(Int_t)dataQualityFlag,dataQuality->GetTimeStamp());
              if (dataQualityFlag == kTRUE){
                // found TRUE value, continuing
                iDataQuality++;
                continue;
              }
              else{
                /*
                // the check was already done before
                if (iDataQuality == indexDataQuality) {  // the first Data Quality value should be TRUE, but ignoring the problem now...
                Printf("ERROR: The first value for the Data Quality MUST be TRUE! Ignoring for now...");
                }
                */
                falses[iFalse*2] = dataQuality->GetTimeStamp();
                foundEndOfFalse = kFALSE;
                Int_t iDataQualityNext = iDataQuality+1;
                while (iDataQualityNext < nDataQuality){
                  AliDCSArray* dataQualityNext = (AliDCSArray*)dataQualityArray->At(iDataQualityNext);
                  if (dataQualityNext->GetTimeStamp()>timeDataQualityStart && dataQualityNext->GetTimeStamp()<=timeEnd && dataQualityNext->GetTimeStamp() > dataQuality->GetTimeStamp()){ // considering only values between the first valid and the end of the run, and subsequent to the current value
                    Bool_t dataQualityFlagNext = dataQualityNext->GetBool(0);
                    Printf("DataQualityNext = %d (set at %f)",(Int_t)dataQualityFlagNext,dataQualityNext->GetTimeStamp());
                    if (dataQualityFlagNext == kTRUE){
                      // found TRUE value, first FALSE period completed
                      foundEndOfFalse = kTRUE;
                      falses[iFalse*2+1] = dataQualityNext->GetTimeStamp();
                      iFalse++;
                      break;
                    }
                    iDataQualityNext++;
                  }
                }
                if (!foundEndOfFalse) {
                  Printf("Please, note that the last FALSE value lasted until the end of the run");
                  falses[iFalse*2+1] = timeEnd;
                  iFalse++;
                  break;
                }
                iDataQuality = iDataQualityNext+1;
              }
            }
          }
          grpobj->SetNFalseDataQualityFlag(iFalse);
          grpobj->SetFalseDataQualityFlagPeriods(falses);
        }
      }
    }
    delete dataQualityArray;
  }
  else{
    Printf("ERROR: Data Quality Flag array not found in LHC Data file!!!");
  }

  // Processing data to go to AliLHCData object
  AliLHCData* dt = new AliLHCData(fileName.Data(),timeStart,timeEnd);
  // storing AliLHCData in OCDB
  if (dt){
    Printf(Form("Filled %d records to AliLHCData object",dt->GetData().GetEntriesFast()));
    AliCDBMetaData md;
    md.SetResponsible("Ruben Shahoyan");
    md.SetComment("LHC data from the GRP preprocessor.");
    Bool_t result = kTRUE;
    AliCDBId id("GRP/GRP/LHCData", 0, AliCDBRunRange::Infinity());
    result = cdb->Put(dt, id, &md); 
    delete dt;
    if (!result){
      Printf("Problems in storing LHC Data - but not going into Error");
    }
  }

  // processing LHC Phase

  TObjArray *beam1phase = lhcReader.ReadSingleLHCDP(fileName.Data(),fgkLHCDataPoints[4]);
  TObjArray *beam2phase = lhcReader.ReadSingleLHCDP(fileName.Data(),fgkLHCDataPoints[5]);
  if (beam1phase == 0x0 || beam2phase == 0x0){
    Printf(Form("Problems in retrieving LHC Clock data from LHC file"));
    return 4;
  }			
  AliLHCClockPhase *phaseObj = ProcessLHCClockPhase(beam1phase,beam2phase,timeEnd);
  delete beam1phase;
  delete beam2phase;
  if (phaseObj){
    Printf(Form("LHC Phase found"));
    AliCDBMetaData mdPhase;
    mdPhase.SetResponsible("Cvetan Cheshkov");
    mdPhase.SetComment("LHC Clock Phase");
    Bool_t result = kTRUE;
    AliCDBId id("GRP/Calib/LHCClockPhase", 0, AliCDBRunRange::Infinity());
    result = cdb->Put(phaseObj, id, &mdPhase); 
    delete phaseObj;
    if (!result) return 3;
  }
  else return 4;

  return 0;
}
开发者ID:alisw,项目名称:AliRoot,代码行数:101,代码来源:MakeLHCDataEntry.C

示例12: MakeCosmicTriggersEntry

Bool_t MakeCosmicTriggersEntry(const char *fileName, const char* cdbUri)
{
  const char* macroname = "MakeCosmicTriggersEntry.C";

  if (gSystem->AccessPathName(fileName)) {
    Error(macroname,Form("file (%s) not found", fileName));
    return kFALSE;
  }

  ifstream *file = new ifstream(fileName);
  if (!*file) {
    Error(macroname,Form("Error opening file (%s) !",fileName));
    file->close();
    delete file;
    return kFALSE;
  }

  THashTable *table = new THashTable();
  table->SetName("List of defined cosmic triggers");

  TString strLine;
  while (strLine.ReadLine(*file)) {

    if (strLine.BeginsWith("#")) continue;

    strLine.ReplaceAll(" ","");
    strLine.ReplaceAll("\t","");
    if (strLine.IsNull()) continue;

    TObjString *obj = new TObjString(strLine.Data());
    table->Add(obj);
  }

  file->close();
  delete file;


  // create OCDB storage
  TString Storage(cdbUri);
  if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) {
    Error(macroname,"STORAGE variable set to %s is not valid. Exiting\n",Storage.Data());
    return kFALSE;
  }
  AliCDBManager* cdb = AliCDBManager::Instance();
  AliCDBStorage* storage = cdb->GetStorage(Storage.Data());
  if(!storage){
    Error(macroname,"Unable to open storage %s\n",Storage.Data());
    return kFALSE;
  }

  AliCDBMetaData* md = new AliCDBMetaData();
  md->SetResponsible("Federico Antinori");
  md->SetComment("List of the defined cosmic triggers. It is used in order to steer the reconstruction, namely in the selection of the proper event specie. It is maintained and updated by the trigger coordinator.");
  // Get root and AliRoot versions and set them in the metadata
  const char* rootv = gROOT->GetVersion();
  TString av(ALIROOT_VERSION);
  TString revnum(ALIROOT_REVISION);
  av+=" - revision: ";
  av+=revnum;
  md->SetAliRootVersion(av.Data());

  AliCDBId id("GRP/Calib/CosmicTriggers",0,AliCDBRunRange::Infinity());
  Info(macroname,"Saving the list of defined cosmic triggers in the OCDB storage \"%s\"",Storage.Data());
  storage->Put(table,id,md);

  table->Delete();
  delete table;

  return kTRUE;
}
开发者ID:alisw,项目名称:AliRoot,代码行数:70,代码来源:MakeCosmicTriggersEntry.C

示例13: MakeTRDFullMisAlignment


//.........这里部分代码省略.........
  Double_t smrx    = 0.4 / 1000.0 / TMath::Pi()*180; // 0.4 mrad
  Double_t smry    = 2.0 / 1000.0 / TMath::Pi()*180; // 2.0 mrad
  Double_t smrz    = 0.4 / 1000.0 / TMath::Pi()*180; // 0.4 mrad
  // Truncation for the chambers
  Double_t cutSmdx = 3.0 * smdx;
  Double_t cutSmdy = 3.0 * smdy;
  Double_t cutSmdz = 3.0 * smdz;

  // Sigmas for the chambers
  Double_t chdx    = 0.05;  // 0.5 mm
  Double_t chdy    = 0.1;   // 1.0 mm
  Double_t chdz    = 0.007; // 70  microns
  Double_t chrx    = 0.0005 / 1000.0 / TMath::Pi()*180; // 0 mrad
  Double_t chry    = 0.0005 / 1000.0 / TMath::Pi()*180; // 0 mrad
  Double_t chrz    = 0.3    / 1000.0 / TMath::Pi()*180; // 0.3 mrad
  // Truncation for the chambers
  Double_t cutChdx = 1.0  * chdx;
  Double_t cutChdy = 1.0  * chdy;
  Double_t cutChdz = 0.14 * chdz;

  Int_t sActive[18]={1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1};
  Double_t dx,dy,dz,rx,ry,rz;

  Int_t j=0;
  UShort_t volid;
  const char *symname;

  // create the supermodules' alignment objects
  for (int iSect; iSect<18; iSect++) {
    TString sm_symname(Form("TRD/sm%02d",iSect));
    dx = AliMathBase::TruncatedGaus(0.0,smdx,cutSmdx); 
    dy = AliMathBase::TruncatedGaus(0.0,smdy,cutSmdy); 
    dz = AliMathBase::TruncatedGaus(0.0,smdz,cutSmdz); 
    rx = gRandom->Rndm() * 2.0*smrx - smrx;
    ry = gRandom->Rndm() * 2.0*smry - smry;
    rz = gRandom->Rndm() * 2.0*smrz - smrz;
    if( (TString(gSystem->Getenv("REALSETUP")) == TString("kTRUE")) && !sActive[iSect] ) continue;
    new((*array)[j++]) AliAlignObjParams(sm_symname.Data(),0,dx,dy,dz,rx,ry,rz,kFALSE);
  }
  // apply supermodules' alignment objects
  Int_t smCounter=0;
  for(Int_t iSect=0; iSect<18; iSect++){
    if( (TString(gSystem->Getenv("REALSETUP")) == TString("kTRUE")) && !sActive[iSect] ) continue;
    AliAlignObjParams* smobj =
      (AliAlignObjParams*)array->UncheckedAt(smCounter++);
    if(!smobj->ApplyToGeometry()){
      Fatal(macroname,Form("application of full misalignment object for sector %d failed!",iSect));
      return;
    }
  }

  // create the chambers' alignment objects
  ran = new TRandom(4357);
  Int_t chId;
  for (Int_t iLayer = AliGeomManager::kTRD1; iLayer <= AliGeomManager::kTRD6; iLayer++) {
    chId=-1;
    for (Int_t iSect = 0; iSect < 18; iSect++){
      for (Int_t iCh = 0; iCh < 5; iCh++) {
        dx = AliMathBase::TruncatedGaus(0.0,chdx,cutChdx); 
        dy = AliMathBase::TruncatedGaus(0.0,chdy,cutChdy); 
        dz = AliMathBase::TruncatedGaus(0.0,chdz,cutChdz); 
        rx = gRandom->Rndm() * 2.0*chrx - chrx;
        ry = gRandom->Rndm() * 2.0*chry - chry;
        rz = gRandom->Rndm() * 2.0*chrz - chrz;
        chId++;
        if ((iSect==13 || iSect==14 || iSect==15) && iCh==2) continue;
        volid = AliGeomManager::LayerToVolUID(iLayer,chId);
        if( (TString(gSystem->Getenv("REALSETUP")) == TString("kTRUE")) && !sActive[iSect] ) continue;
        symname = AliGeomManager::SymName(volid);
        new((*array)[j++]) AliAlignObjParams(symname,volid,dx,dy,dz,rx,ry,rz,kFALSE);
      }
    }
  }

  if( TString(gSystem->Getenv("TOCDB")) != TString("kTRUE") ){
    // save on file
    const char* filename = "TRDfullMisalignment.root";
    TFile f(filename,"RECREATE");
    if(!f){
      Error(macroname,"cannot open file for output\n");
      return;
    }
    Info(macroname,"Saving alignment objects to the file %s", filename);
    f.cd();
    f.WriteObject(array,"TRDAlignObjs","kSingleKey");
    f.Close();
  }else{
    // save in CDB storage
    Info(macroname,"Saving alignment objects in CDB storage %s",
	 Storage.Data());
    AliCDBMetaData* md = new AliCDBMetaData();
    md->SetResponsible("Dariusz Miskowiec");
    md->SetComment("Full misalignment for TRD");
    md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
    AliCDBId id("TRD/Align/Data",0,AliCDBRunRange::Infinity());
    storage->Put(array,id,md);
  }

  array->Delete();
}
开发者ID:alisw,项目名称:AliRoot,代码行数:101,代码来源:MakeTRDFullMisAlignment.C

示例14: UploadRejectList

void UploadRejectList(Int_t firstRun=0, Int_t lastRun=AliCDBRunRange::Infinity())
{
  AliCDBManager::Instance()->SetDefaultStorage("alien://folder=/alice/data/2015/OCDB");
  AliCDBManager::Instance()->SetRun(firstRun);
  AliCDBManager::Instance()->SetSpecificStorage("MUON/Calib/RejectList","alien://folder=/alice/cern.ch/user/l/laphecet/OCDB2015");

  AliMpCDB::LoadAll();
  
  AliMUONRejectList rl;
  
  rl.SetDetectionElementProbability(806,1.0); // alignment problem
  
  // first round of checks in LHC13f with first run of the period : 4 holes
  rl.SetHVProbability("MchHvLvRight/Chamber03Right/Quad4Sect1",1.0);
  rl.SetPCBProbability(811,4,1.0);
  rl.SetPCBProbability(900,1,1.0);
  rl.SetPCBProbability(1010,0,1.0);
  
  // second scan of LHC13f: all runs
  
  // DE 612 : one of the 7-8 HV capa per PCB went bad ?
  // remove 3 full manus and then the channels in between...
  rl.SetManuProbability(612,1034,1.0);
  rl.SetManuProbability(612,112,1.0);
  rl.SetManuProbability(612,14,1.0);
  
  for ( Int_t i = 0; i < 8; ++i )
  {
    rl.SetChannelProbability(612,111,i,1.0);
    rl.SetChannelProbability(612,113,40+i,1.0);

    rl.SetChannelProbability(612,15,40+i,1.0);
    rl.SetChannelProbability(612,13,i,1.0);
    
  }
  
  for ( Int_t i = 48; i <= 63; ++i )
  {
    rl.SetChannelProbability(612,1141,i,1.0);
  }
  for ( Int_t i = 32; i <= 47; ++i )
  {
    rl.SetChannelProbability(612,1141,i,1.0);
  }
  
  for ( Int_t i = 0; i <= 31; ++i )
  {
    rl.SetChannelProbability(612,1140,i,1.0);
  }
  
  // DE 714 : same story as in DE 612 ...
  rl.SetManuProbability(714,111,1.0);
  rl.SetManuProbability(714,216,1.0);
  rl.SetManuProbability(714,1143,1.0);

  for ( Int_t i = 47; i <= 32; ++i )
  {
    rl.SetChannelProbability(714,112,i,1.0);
  }
  for ( Int_t i = 0; i <= 15; ++i )
  {
    rl.SetChannelProbability(714,215,i,1.0);
  }
  for ( Int_t i = 18; i <= 63; ++i )
  {
    rl.SetChannelProbability(714,1233,i,1.0);
  }
  for ( Int_t i = 32; i <= 47; ++i )
  {
    rl.SetChannelProbability(714,112,i,1.0);
  }
  rl.SetChannelProbability(714,1142,0,1.0);
  rl.SetChannelProbability(714,1142,1,1.0);

  
  rl.SetManuProbability(903,1129,1.0);
  rl.SetManuProbability(903,108,1.0);

  // only for run 196646
  rl.SetDetectionElementProbability(919,1.0);
  rl.SetPCBProbability(918,1,1.0);
  rl.SetPCBProbability(918,2,1.0);
  rl.SetPCBProbability(918,3,1.0);
  rl.SetBusPatchProbability(1648,1.0); // BP on DE 918
  
  AliCDBId id("MUON/Calib/RejectList",firstRun,lastRun);

  AliCDBMetaData metaData;
  metaData.SetBeamPeriod(0);
  metaData.SetResponsible("MUON TRK");
  metaData.SetComment("Uploaded by UploadRejectList.C macro (handmade by L. Aphecetche) using information from MC vs Data tracking efficiency studies (Javier Martin Bianco) - eye scan (P. Pillot) - only for run 196646 -");
    
  AliCDBManager::Instance()->Put(&rl,id,&metaData);
}
开发者ID:aphecetche,项目名称:acode,代码行数:94,代码来源:UploadRejectList.C

示例15: SetCC

//------------------------------------------------------------------------
void SetCC(Int_t flag=0)
{
  // Writing calibration coefficients into the Calibration DB
  // Arguments:
  //   flag=0: all calibration coefficients are equal
  //   flag=1: decalibration coefficients
  //   flag=2: calibration coefficients equal to inverse decalibration ones
  // Author: Boris Polishchuk (Boris.Polichtchouk at cern.ch)

  TString DBFolder;
  Int_t firstRun   =  0;
  Int_t lastRun    =  0;
  Int_t beamPeriod =  1;
  char* objFormat  = "";

  AliPHOSCalibData* cdb = 0;

  if      (flag == 0) {
    // Ideal calibration with all channels at nominal value 0.005
    DBFolder  ="local://InitCalibDB";
    firstRun  =  0;
    lastRun   =  AliCDBRunRange::Infinity();
    objFormat = "PHOS ideal pedestals and ADC gain factors (5x64x56)";
    cdb = new AliPHOSCalibData();
    cdb->CreateNew();
  }

  else if (flag == 1) {
    // Full decalibration is +-10% of the nominal value
    DBFolder  ="local://FullDecalibDB";
    firstRun  =  0;
    lastRun   =  AliCDBRunRange::Infinity();
    objFormat = "PHOS fully decalibrated calibration coefficients (5x64x56)";
 
    cdb = new AliPHOSCalibData();    
    cdb->RandomEmc(0.045,0.055);
    cdb->RandomCpv(0.0008,0.0016);
  }
  
  else if (flag == 2) {
    // Residual decalibration is +-1% of the nominal value
    DBFolder  ="local://ResidualCalibDB";
    firstRun  =  0;
    lastRun   =  AliCDBRunRange::Infinity();
    objFormat = "PHOS residual calibration coefficients (5x64x56)";
    
    cdb = new AliPHOSCalibData();    
    cdb->RandomEmc(0.00495,0.00505);
    cdb->RandomCpv(0.00115,0.00125);
  }
  
  //Store calibration data into database
  
  AliCDBMetaData md;
  md.SetComment(objFormat);
  md.SetBeamPeriod(beamPeriod);
  md.SetResponsible("Boris Polichtchouk");
  
  AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  if(gSystem->Getenv("STORAGE")){
    cout << "Setting specific storage" << endl;
    AliCDBManager::Instance()->SetSpecificStorage("PHOS/*",DBFolder.Data());
  }

  cdb->WriteEmc(firstRun,lastRun,&md);
  cdb->WriteCpv(firstRun,lastRun,&md);
  cdb->WriteEmcBadChannelsMap(firstRun,lastRun,&md);

}
开发者ID:alisw,项目名称:AliRoot,代码行数:70,代码来源:MakePHOSEmcCalib.C


注:本文中的AliCDBMetaData::SetComment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。