fixing backward incompatible operator=, check for existence of fEventPlaneP
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Apr 2011 14:56:30 +0000 (14:56 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Apr 2011 14:56:30 +0000 (14:56 +0000)
STEER/AliAODHeader.cxx

index 4a2c56a..274a326 100644 (file)
@@ -308,7 +308,11 @@ AliAODHeader& AliAODHeader::operator=(const AliAODHeader& hdr)
     fL0TriggerInputs    = hdr.fL0TriggerInputs;
     fL1TriggerInputs    = hdr.fL1TriggerInputs;
     fL2TriggerInputs    = hdr.fL2TriggerInputs;
-    fEventplaneP        = new AliEventplane(*hdr.fEventplaneP);
+
+    if(hdr.fEventplaneP){
+      if(fEventplaneP)*fEventplaneP = *hdr.fEventplaneP;
+      else fEventplaneP = new AliEventplane(*hdr.fEventplaneP);
+    }
 
     if(hdr.fCentralityP){
       if(fCentralityP)*fCentralityP = *hdr.fCentralityP;