void FSRBinByBin(const char* MODE,TString datasetName, char* chunk, TString Alt) { // directory with data TString protocol = "file://"; //TString dirname = "/mnt/hadoop/store/user/asvyatko/DYstudy/dataAnalysis13/rootfiles/"; TString dirnameEE = "/scratch/scratch95/a/asvyatko/DY2013/rootfiles_Purdue/"; TString dirnameMuMu = "/scratch/lustreC/a/asvyatko/DY2013/rootfiles_Purdue/"; TString dirname = dirnameMuMu; if (datasetName.Contains("EE")) dirname = dirnameEE; TString ncores = "30"; //if (!datasetName.Contains("samp") && (chunk.Contains("_") || datasetName.Contains("00"))) ncores = "1"; if (!(datasetName.Contains("1020") || datasetName.Contains("samp"))) ncores = "3"; if (datasetName.Contains("1020")) ncores = "10"; TString beautiful = beautifulDataset(datasetName); TFileCollection* c = loadChunks(chunk[0],protocol,dirname,datasetName,beautiful); gSystem->Load("Muon_cc.so"); gSystem->Load("Electron_cc.so"); gSystem->Load("Dimuon_cc.so"); gSystem->Load("Dielectron_cc.so"); gEnv->SetValue("ProofLite.Sandbox", "/home/asvyatko/DYStudy/CMSSW_5_3_3_patch2/src/Analysis/DYPackage/test/FSRunfold_Purdue/proofbox/"); TProof* p = TProof::Open("workers="+ncores); p->RegisterDataSet(datasetName+chunk, c,"OV"); p->ShowDataSets(); TObjString* mode = new TObjString(MODE); p->AddInput(new TNamed("mode",MODE)); gROOT->Time(); p->SetParameter("PROOF_LookupOpt", "all"); p->Process(datasetName+chunk+"#/recoTree/DiLeptonTree","EventSelector_FSRUnfBBB.C+"); }
void Update(float elapsed, ShaderProgram* program){ if(state == STATE_MAIN_MENU) { for(int i=0; i < menuEntities.size(); i++) {//loop through entities and update al menuEntities[i].Update(elapsed); } viewMatrix.identity(); } else if (state == STATE_GAME_LEVEL){ for(int i=0; i < entities.size(); i++){//loop through entities and update all entities[i].Update(elapsed); } if (!PLAYER_ENT.godmode) { for(int i=0; i < entities.size(); i++) { if (entities[i].isAlive && !entities[i].isStatic){ for(int j=0; j < entities.size(); j++){ if(i!=j && entities[j].isAlive && entities[i].collidesWith(entities[j])){ if (i == 0 && entities[j].type == ENEMY) { gameOver(program);//we got deaded } entities[i].uncollide(entities[j]); } } } } //bullet stuff for(int i=0; i < bullets.size(); i++){ if (bullets[i].isAlive){ bullets[i].Update(elapsed); for (int j = 0; j < entities.size(); j++){ if(j != 0 && entities[j].isAlive && bullets[i].collidesWith(entities[j])){//do collision stuffs if (entities[j].type == BPLATFORM || entities[j].type == ENEMY){ entities[j].isAlive = false; entities[j].~Entity(); } bullets[i].isAlive = false; bullets[i].~Entity(); screenShakeSpeed = 70.0f; } } } } if (!peaceful && rand() % 100 < 0.01){ spawnEnemy(); } } loadChunks(); viewMatrix.identity(); viewMatrix.Translate(-(PLAYER_ENT.x), -(PLAYER_ENT.y), 0); screenShakeValue += elapsed; viewMatrix.Translate(cos(screenShakeValue * screenShakeSpeed)* screenShakeIntensity, sin(screenShakeValue * screenShakeSpeed)* screenShakeIntensity,0.0f); if (screenShakeSpeed > 0.0f){ screenShakeSpeed -= 10.0f; } } program->setViewMatrix(viewMatrix); //printf("State: %d\n",state); //printf("menusize: %lu\n",menuEntities.size()); //printf("entitnysize: %lu\n",entities.size()); }