예제 #1
0
파일: KVList.cpp 프로젝트: pwigg/kaliveda
void KVList::Streamer(TBuffer &R__b)
{
    // Backwards-compatible streamer

    UInt_t R__s, R__c;
    if (R__b.IsReading()) {
        Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
        if (R__v < 3) {
            // read in old KVList object which inherited from TList
            TList list;
            list.Streamer(R__b);
            TQObjSender fQObj;
            fQObj.Streamer(R__b);
            SetOwner(list.IsOwner()); // was list owner of objects ?
            list.SetOwner(kFALSE); // make sure old list doesn't delete objects when it goes out of scope
            TIter next(&list);
            TObject* obj;
            while ( (obj = next()) ) Add(obj);
            list.Clear();
        }
        else
            R__b.ReadClassBuffer(KVList::Class(),this,R__v,R__s,R__c);
    } else {
        R__b.WriteClassBuffer(KVList::Class(),this);
    }
}
예제 #2
0
void KVReconstructedEvent::Streamer(TBuffer & R__b)
{
   //Stream an object of class KVReconstructedEvent.
   //We set the particles' angles depending on whether mean or random angles
   //are wanted (fMeanAngles = kTRUE or kFALSE)

   if (R__b.IsReading()) {
      R__b.ReadClassBuffer(KVReconstructedEvent::Class(), this);
      // if the multidetector object exists, update some informations
      // concerning the detectors etc. hit by this particle
      if ( gMultiDetArray ){
      	//set angles
      	KVReconstructedNucleus *par;
      	while ((par = GetNextParticle())) {
         	if (HasMeanAngles())
               par->GetAnglesFromStoppingDetector("mean");
         	else
                par->GetAnglesFromStoppingDetector("random");
         	//reconstruct fAnalStatus information for KVReconstructedNucleus
         	if (par->GetStatus() == 99)        //AnalStatus has not been set for particles in group
            	if (par->GetGroup())
                KVReconstructedNucleus::AnalyseParticlesInGroup( par->GetGroup() );
         }
      }
   } else {
      R__b.WriteClassBuffer(KVReconstructedEvent::Class(), this);
   }
}
예제 #3
0
//______________________________________________________________________________
void GmpNormAna::Streamer(TBuffer &R__b)
{
   // Stream an object of class GmpNormAna.

   if (R__b.IsReading()) {
      R__b.ReadClassBuffer(GmpNormAna::Class(),this);
   } else {
      R__b.WriteClassBuffer(GmpNormAna::Class(),this);
   }
}
예제 #4
0
//______________________________________________________________________________
void RapidRun::Streamer(TBuffer &R__b)
{
   // Stream an object of class RapidRun.

   if (R__b.IsReading()) {
      R__b.ReadClassBuffer(RapidRun::Class(),this);
   } else {
      R__b.WriteClassBuffer(RapidRun::Class(),this);
   }
}
예제 #5
0
//______________________________________________________________________________
void Event::Streamer(TBuffer &R__b)
{
   // Stream an object of class Event.

   if (R__b.IsReading()) {
      R__b.ReadClassBuffer(Event::Class(),this);
   } else {
      R__b.WriteClassBuffer(Event::Class(),this);
   }
}
예제 #6
0
//___________________________________________________________________________________________
void KVIntegerList::Streamer(TBuffer& R__b)
{
//Streamer specifique
//l'écriture dans un fichier root se fait par l'intermédiaire de la classe TNamed
//seul, le nom et la partition et sa population sont enregistrées dans le fichier
//la lecture utilise aussi le streamer de TNamed, puis il y a un appel a la routine
// protected DeducePartitionFromTNamed() qui permet de recréer complètement l'objet KVIntegerList
   if (R__b.IsReading()) {
      R__b.ReadClassBuffer(TNamed::Class(), this);
      DeducePartitionFromTNamed();
   } else {
      SetTitle(Form("%d", GetPopulation()));
      R__b.WriteClassBuffer(TNamed::Class(), this);
   }
}
예제 #7
0
void KVINDRAReconEvent::Streamer(TBuffer & R__b)
{
   //Stream an object of class KVINDRAReconEvent.
   //We loop over the newly-read particles in order to set their
   //IsOK() status by comparison with the event's code mask.

    if (R__b.IsReading()) {
        R__b.ReadClassBuffer(KVINDRAReconEvent::Class(), this);
        KVINDRAReconNuc *par;
        while ((par = GetNextParticle())) {
            par->SetIsOK(CheckCodes(par->GetCodes()));
        }
    } else {
        R__b.WriteClassBuffer(KVINDRAReconEvent::Class(), this);
    }
}