Sfoglia il codice sorgente

Fixed UEvent lowercase/uppercase mismatch.

Nikita Ermakov 5 anni fa
parent
commit
8ed2dd1d8c
3 ha cambiato i file con 21 aggiunte e 21 eliminazioni
  1. 6 6
      UEvent.cxx
  2. 7 7
      UEvent.h
  3. 8 8
      urqmd2u.cpp

+ 6 - 6
UEvent.cxx

@@ -64,7 +64,7 @@ void UEvent::print(Option_t* option) {
 }
 
 //_________________
-UParticle* UEvent::GetParticle(Int_t index) const {
+UParticle* UEvent::getParticle(Int_t index) const {
   // Get pointer to the particle.
   // index - index of the particle
   if(index < 0) {
@@ -77,7 +77,7 @@ UParticle* UEvent::GetParticle(Int_t index) const {
 }
 
 //_________________
-void UEvent::AddParticle(Int_t index, Int_t pdg, Int_t status,
+void UEvent::addParticle(Int_t index, Int_t pdg, Int_t status,
                   			 Int_t parent, Int_t parentDecay,
                   			 Int_t mate, Int_t decay, Int_t child[2],
                   			 Double_t px, Double_t py, Double_t pz, Double_t e,
@@ -91,7 +91,7 @@ void UEvent::AddParticle(Int_t index, Int_t pdg, Int_t status,
 }
 
 //_________________
-void UEvent::AddParticle(Int_t index, Int_t pdg, Int_t status,
+void UEvent::addParticle(Int_t index, Int_t pdg, Int_t status,
                   			 Int_t parent, Int_t parentDecay,
                   			 Int_t mate, Int_t decay, Int_t child[2],
                   			 TLorentzVector mom, TLorentzVector pos,
@@ -104,7 +104,7 @@ void UEvent::AddParticle(Int_t index, Int_t pdg, Int_t status,
 }
 
 //_________________
-void UEvent::AddParticle(const UParticle& particle) {
+void UEvent::addParticle(const UParticle& particle) {
   // Add particle to the array
   new ((*fParticles)[fNpa]) UParticle(particle);
   fNpa += 1;
@@ -128,14 +128,14 @@ void UEvent::setParameters(const Int_t& eventNr, const Double_t& b,
 }
 
 //_________________
-void UEvent::Clear() {
+void UEvent::clear() {
   // Remove the particles from the array and reset counter
   fParticles->Clear();
   fNpa = 0;
 }
 
 //_________________
-void UEvent::RemoveAt(Int_t i) {
+void UEvent::removeAt(Int_t i) {
   // Remove one particle from the array.
   // i - index of the particle.
   // Array is automaticaly compressed afterwards, mind the indexing

+ 7 - 7
UEvent.h

@@ -50,8 +50,8 @@ class UEvent : public TObject {
   void comment(TString& comment) const { comment = fComment; }
 
   Int_t    GetNpa()     const {return (Int_t)fNpa;}
-  TClonesArray* GetParticleList() const {return fParticles;}
-  UParticle* GetParticle(Int_t index) const;
+  TClonesArray* getParticleList() const {return fParticles;}
+  UParticle* getParticle(Int_t index) const;
 
   //
   // Setters
@@ -88,17 +88,17 @@ class UEvent : public TObject {
   /// Set comment
   void setComment(const char* comment)   { fComment = comment; }
 
-  void AddParticle(Int_t index, Int_t pdg, Int_t status, Int_t parent, Int_t parentDecay,
+  void addParticle(Int_t index, Int_t pdg, Int_t status, Int_t parent, Int_t parentDecay,
 		   Int_t mate, Int_t decay, Int_t child[2],
 		   Double_t px, Double_t py, Double_t pz, Double_t e,
 		   Double_t x, Double_t y, Double_t z, Double_t t,
 		   Double_t weight);
-  void AddParticle(Int_t index, Int_t pdg, Int_t status, Int_t parent, Int_t parentDecay,
+  void addParticle(Int_t index, Int_t pdg, Int_t status, Int_t parent, Int_t parentDecay,
 		   Int_t mate, Int_t decay, Int_t child[2],
 		   TLorentzVector mom, TLorentzVector pos, Double_t weight);
-  void AddParticle(const UParticle& particle);
-  void Clear();
-  void RemoveAt(Int_t i);
+  void addParticle(const UParticle& particle);
+  void clear();
+  void removeAt(Int_t i);
 
  private:
   /// Event number

+ 8 - 8
urqmd2u.cpp

@@ -141,10 +141,10 @@ int main(int argc, char *argv[]) {
     in.ignore(777,'\n'); 
 
     ev->Clear();
-    ev->SetEventNr(nr);
-    ev->SetB(b);
-    ev->SetPhi(0);
-    ev->SetNes((int) (time/dtime));
+    ev->setEventNr(nr);
+    ev->setB(b);
+    ev->setPhi(0);
+    ev->setNes((int) (time/dtime));
     events_processed++;
 
     int step_nr=0;
@@ -161,7 +161,7 @@ int main(int argc, char *argv[]) {
       
       in.ignore(777,'\n'); // ignore the rest of the line
       getline(in,line);
-      ev->SetComment(line.data());
+      ev->setComment(line.data());
       
       for (int i=0;  i<mult; i++) {
 	std::cout << "Working on particle i: " << i;
@@ -180,15 +180,15 @@ int main(int argc, char *argv[]) {
 	if (in.fail()) bomb("while reading tracks");
 	status=parent=parent_decay=decay=child[0]=child[1]=0;
 	std::cout << "I am here 1" << std::endl;
-	ev->AddParticle(i, trapco(ityp, ichg), status, parent,
+	ev->addParticle(i, trapco(ityp, ichg), status, parent,
 			parent_decay, mate-1, decay, child,
 			px, py, pz, e, x, y, z, t, weight);
 	std::cout << "I am here 2" << std::endl;
       } // for (int i=0;  i<mult; i++)
 
       do in.get(c); while (c!='\n');
-      ev->SetStepNr(step_nr++);
-      ev->SetStepT(step_time);
+      ev->setStepNr(step_nr++);
+      ev->setStepT(step_time);
       nout += tr->Fill();
     }
     if (pee==EOF) break;