ROOT logo
const char* filename = "corr.root";

void
WriteFCM()
{
  AliForwardCorrectionManagerOADB& fcm = 
    AliForwardCorrectionManagerOADB::Instance();
  fcm.Init(0, 1, 900, 5);
  fcm.Print("R");

  TFile* file = TFile::Open(filename, "RECREATE");
  fcm.Write();
  delete file;
}

void 
ReadFCM()
{
  TFile* file = TFile::Open(filename, "READ");
  file->Get("forwardCorrections");

  AliForwardCorrectionManagerOADB& fcm = 
    AliForwardCorrectionManagerOADB::Instance();
  // fcm.Init(0, 1, 900, 5);
  fcm.Print("R");
}


void 
TestFCM(bool write=true)
{
  gROOT->Macro("$ALICE_ROOT/PWGLF/FORWARD/analysis2/scripts/LoadLibs.C");

  if (write) WriteFCM();
  else       ReadFCM();
}

    
 TestFCM.C:1
 TestFCM.C:2
 TestFCM.C:3
 TestFCM.C:4
 TestFCM.C:5
 TestFCM.C:6
 TestFCM.C:7
 TestFCM.C:8
 TestFCM.C:9
 TestFCM.C:10
 TestFCM.C:11
 TestFCM.C:12
 TestFCM.C:13
 TestFCM.C:14
 TestFCM.C:15
 TestFCM.C:16
 TestFCM.C:17
 TestFCM.C:18
 TestFCM.C:19
 TestFCM.C:20
 TestFCM.C:21
 TestFCM.C:22
 TestFCM.C:23
 TestFCM.C:24
 TestFCM.C:25
 TestFCM.C:26
 TestFCM.C:27
 TestFCM.C:28
 TestFCM.C:29
 TestFCM.C:30
 TestFCM.C:31
 TestFCM.C:32
 TestFCM.C:33
 TestFCM.C:34
 TestFCM.C:35
 TestFCM.C:36
 TestFCM.C:37
 TestFCM.C:38
 TestFCM.C:39