예제 #1
0
void KVNameValueList::WriteEnvFile(const Char_t* filename)
{
   // Write all name-value pairs in this list as a TEnv format file.
   KVEnv* envfile = ProduceEnvFile();
   envfile->SetRcName(filename);
   envfile->Save();
   delete envfile;
}
예제 #2
0
KVEnv* KVNameValueList::ProduceEnvFile()
{
   // Put all name-value pairs in this list as a TEnv format.
   // delete after use
   KVEnv* envfile = new KVEnv();
   envfile->SetValue("KVNameValueList.Name", GetName());
   envfile->SetValue("KVNameValueList.Title", GetTitle());
   WriteToEnv(envfile);
   return envfile;
}
예제 #3
0
void KVFAZIALNS2016::SetNameOfDetectors(KVEnv& env)
{

   KVFAZIA::SetNameOfDetectors(env);
   env.SetValue("RUTH_SI_1", "SI1-RUTH");
   env.SetValue("RUTH_SI_2", "SI2-RUTH");

}
예제 #4
0
void KVFAZIA::GenerateCorrespondanceFile()
{
   fDetectorLabels = "SI1,SI2,CSI";
#ifdef WITH_GNU_INSTALL
   fCorrespondanceFile.Form("%s/%s-%s.names", KVBase::WorkingDirectory(), gSystem->Getenv("USER"), ClassName());
#else
   fCorrespondanceFile.Form("%s/%s-%s.names", KVBase::GetDATADIRFilePath(), gSystem->Getenv("USER"), ClassName());
#endif
   Info("GenerateCorrespondanceFile", "Creation de %s", fCorrespondanceFile.Data());
   KVEnv env;

   SetNameOfDetectors(env);

   env.AddCommentLine(Form("Automatic generated file by %s::GenerateCorrespondanceFile", ClassName()));
   env.AddCommentLine("Make link between geometric ROOT objects and detector names");
   env.WriteFile(fCorrespondanceFile.Data());
   fDetectorLabels = "";
}
예제 #5
0
void KVFAZIA::SetNameOfDetectors(KVEnv& env)
{
   for (Int_t bb = fStartingBlockNumber; bb < fNblocks; bb += 1) {
      for (Int_t qq = 1; qq <= 4; qq += 1) {
         for (Int_t tt = 1; tt <= 4; tt += 1) {
            fDetectorLabels.Begin(",");
            while (!fDetectorLabels.End()) {
               KVString sdet = fDetectorLabels.Next();
               env.SetValue(
                  Form("BLOCK_%d_QUARTET_%d_%s-T%d", bb, qq, sdet.Data(), tt),
                  Form("%s-T%d-Q%d-B%03d", sdet.Data(), tt, qq, bb)
               );
            }
         }
      }
   }
}